bad move.. revert

melanie
UbitUmarov 2017-01-14 23:23:56 +00:00
parent 24d12dfba4
commit 6eaa8948a6
1 changed files with 5 additions and 11 deletions

View File

@ -631,7 +631,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
#region Object Permissions #region Object Permissions
#pragma warning disable 0612 #pragma warning disable 0612
const uint DEFAULT_FLAGS = (uint)( const uint DEFAULT_FLAGS = (uint)~(
PrimFlags.ObjectCopy | // Tells client you can copy the object PrimFlags.ObjectCopy | // Tells client you can copy the object
PrimFlags.ObjectModify | // tells client you can modify the object PrimFlags.ObjectModify | // tells client you can modify the object
PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod) PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod)
@ -701,7 +701,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
bool unlocked = (task.ParentGroup.RootPart.OwnerMask & (uint)PermissionMask.Move) != 0; bool unlocked = (task.ParentGroup.RootPart.OwnerMask & (uint)PermissionMask.Move) != 0;
uint effectivePerms;
UUID taskOwnerID = task.OwnerID; UUID taskOwnerID = task.OwnerID;
UUID spID = sp.UUID; UUID spID = sp.UUID;
@ -719,8 +718,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
if(task.ParentGroup.IsAttachment) if(task.ParentGroup.IsAttachment)
{ {
returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked);
effectivePerms = task.ParentGroup.GetEffectivePermissions();
returnMask &= effectivePerms;
if (taskOwnerID != UUID.Zero) if (taskOwnerID != UUID.Zero)
returnMask |= (uint)PrimFlags.ObjectAnyOwner; returnMask |= (uint)PrimFlags.ObjectAnyOwner;
return returnMask; return returnMask;
@ -729,7 +726,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
UUID taskGroupID = task.GroupID; UUID taskGroupID = task.GroupID;
bool groupdOwned = taskOwnerID == taskGroupID; bool groupdOwned = taskOwnerID == taskGroupID;
// if friends with rights then owner // if friends with rights then owner
if (!groupdOwned && IsFriendWithPerms(spID, taskOwnerID)) if (!groupdOwned && IsFriendWithPerms(spID, taskOwnerID))
{ {
@ -757,9 +753,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
returnMask |= (uint)PrimFlags.ObjectOwnerModify; returnMask |= (uint)PrimFlags.ObjectOwnerModify;
return returnMask; return returnMask;
} }
else if(task.GroupMask != 0) else
{ {
// group sharing // group sharing or everyone
returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked);
returnMask |= returnMask |=
(uint)PrimFlags.ObjectGroupOwned | (uint)PrimFlags.ObjectGroupOwned |
@ -767,9 +763,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
return returnMask; return returnMask;
} }
} }
else if(task.GroupMask != 0) else
{ {
// group sharing // group sharing or everyone
returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked);
if (taskOwnerID != UUID.Zero) if (taskOwnerID != UUID.Zero)
returnMask |= (uint)PrimFlags.ObjectAnyOwner; returnMask |= (uint)PrimFlags.ObjectAnyOwner;
@ -778,9 +774,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
} }
// fallback is everyone rights // fallback is everyone rights
effectivePerms = task.ParentGroup.GetEffectivePermissions();
returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked);
returnMask &= effectivePerms;
if (taskOwnerID != UUID.Zero) if (taskOwnerID != UUID.Zero)
returnMask |= (uint)PrimFlags.ObjectAnyOwner; returnMask |= (uint)PrimFlags.ObjectAnyOwner;
return returnMask; return returnMask;