From 6eaa8948a6a10009d32730e93acfc4bf0097733f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 14 Jan 2017 23:23:56 +0000 Subject: bad move.. revert --- .../CoreModules/World/Permissions/PermissionsModule.cs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 4d2bfe5..b60cd93 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -631,7 +631,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions #region Object Permissions #pragma warning disable 0612 - const uint DEFAULT_FLAGS = (uint)( + const uint DEFAULT_FLAGS = (uint)~( PrimFlags.ObjectCopy | // Tells client you can copy the object PrimFlags.ObjectModify | // tells client you can modify the object 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; - uint effectivePerms; UUID taskOwnerID = task.OwnerID; UUID spID = sp.UUID; @@ -719,8 +718,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions if(task.ParentGroup.IsAttachment) { returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); - effectivePerms = task.ParentGroup.GetEffectivePermissions(); - returnMask &= effectivePerms; if (taskOwnerID != UUID.Zero) returnMask |= (uint)PrimFlags.ObjectAnyOwner; return returnMask; @@ -729,7 +726,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions UUID taskGroupID = task.GroupID; bool groupdOwned = taskOwnerID == taskGroupID; - // if friends with rights then owner if (!groupdOwned && IsFriendWithPerms(spID, taskOwnerID)) { @@ -757,9 +753,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions returnMask |= (uint)PrimFlags.ObjectOwnerModify; return returnMask; } - else if(task.GroupMask != 0) + else { - // group sharing + // group sharing or everyone returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); returnMask |= (uint)PrimFlags.ObjectGroupOwned | @@ -767,9 +763,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions return returnMask; } } - else if(task.GroupMask != 0) + else { - // group sharing + // group sharing or everyone returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); if (taskOwnerID != UUID.Zero) returnMask |= (uint)PrimFlags.ObjectAnyOwner; @@ -778,9 +774,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions } // fallback is everyone rights - effectivePerms = task.ParentGroup.GetEffectivePermissions(); returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); - returnMask &= effectivePerms; if (taskOwnerID != UUID.Zero) returnMask |= (uint)PrimFlags.ObjectAnyOwner; return returnMask; -- cgit v1.1