diff options
author | UbitUmarov | 2017-01-14 23:23:56 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-14 23:23:56 +0000 |
commit | 6eaa8948a6a10009d32730e93acfc4bf0097733f (patch) | |
tree | eece67d82d723b1c04345ac181db830145c34f12 /OpenSim/Region/CoreModules | |
parent | permissions GenerateClientFlags() also needs group GetEffectivePermissions() ... (diff) | |
download | opensim-SC_OLD-6eaa8948a6a10009d32730e93acfc4bf0097733f.zip opensim-SC_OLD-6eaa8948a6a10009d32730e93acfc4bf0097733f.tar.gz opensim-SC_OLD-6eaa8948a6a10009d32730e93acfc4bf0097733f.tar.bz2 opensim-SC_OLD-6eaa8948a6a10009d32730e93acfc4bf0097733f.tar.xz |
bad move.. revert
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 16 |
1 files changed, 5 insertions, 11 deletions
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 | |||
631 | 631 | ||
632 | #region Object Permissions | 632 | #region Object Permissions |
633 | #pragma warning disable 0612 | 633 | #pragma warning disable 0612 |
634 | const uint DEFAULT_FLAGS = (uint)( | 634 | const uint DEFAULT_FLAGS = (uint)~( |
635 | PrimFlags.ObjectCopy | // Tells client you can copy the object | 635 | PrimFlags.ObjectCopy | // Tells client you can copy the object |
636 | PrimFlags.ObjectModify | // tells client you can modify the object | 636 | PrimFlags.ObjectModify | // tells client you can modify the object |
637 | PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod) | 637 | PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod) |
@@ -701,7 +701,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
701 | 701 | ||
702 | bool unlocked = (task.ParentGroup.RootPart.OwnerMask & (uint)PermissionMask.Move) != 0; | 702 | bool unlocked = (task.ParentGroup.RootPart.OwnerMask & (uint)PermissionMask.Move) != 0; |
703 | 703 | ||
704 | uint effectivePerms; | ||
705 | UUID taskOwnerID = task.OwnerID; | 704 | UUID taskOwnerID = task.OwnerID; |
706 | UUID spID = sp.UUID; | 705 | UUID spID = sp.UUID; |
707 | 706 | ||
@@ -719,8 +718,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
719 | if(task.ParentGroup.IsAttachment) | 718 | if(task.ParentGroup.IsAttachment) |
720 | { | 719 | { |
721 | returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); | 720 | returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); |
722 | effectivePerms = task.ParentGroup.GetEffectivePermissions(); | ||
723 | returnMask &= effectivePerms; | ||
724 | if (taskOwnerID != UUID.Zero) | 721 | if (taskOwnerID != UUID.Zero) |
725 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; | 722 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; |
726 | return returnMask; | 723 | return returnMask; |
@@ -729,7 +726,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
729 | UUID taskGroupID = task.GroupID; | 726 | UUID taskGroupID = task.GroupID; |
730 | bool groupdOwned = taskOwnerID == taskGroupID; | 727 | bool groupdOwned = taskOwnerID == taskGroupID; |
731 | 728 | ||
732 | |||
733 | // if friends with rights then owner | 729 | // if friends with rights then owner |
734 | if (!groupdOwned && IsFriendWithPerms(spID, taskOwnerID)) | 730 | if (!groupdOwned && IsFriendWithPerms(spID, taskOwnerID)) |
735 | { | 731 | { |
@@ -757,9 +753,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
757 | returnMask |= (uint)PrimFlags.ObjectOwnerModify; | 753 | returnMask |= (uint)PrimFlags.ObjectOwnerModify; |
758 | return returnMask; | 754 | return returnMask; |
759 | } | 755 | } |
760 | else if(task.GroupMask != 0) | 756 | else |
761 | { | 757 | { |
762 | // group sharing | 758 | // group sharing or everyone |
763 | returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); | 759 | returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); |
764 | returnMask |= | 760 | returnMask |= |
765 | (uint)PrimFlags.ObjectGroupOwned | | 761 | (uint)PrimFlags.ObjectGroupOwned | |
@@ -767,9 +763,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
767 | return returnMask; | 763 | return returnMask; |
768 | } | 764 | } |
769 | } | 765 | } |
770 | else if(task.GroupMask != 0) | 766 | else |
771 | { | 767 | { |
772 | // group sharing | 768 | // group sharing or everyone |
773 | returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); | 769 | returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); |
774 | if (taskOwnerID != UUID.Zero) | 770 | if (taskOwnerID != UUID.Zero) |
775 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; | 771 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; |
@@ -778,9 +774,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
778 | } | 774 | } |
779 | 775 | ||
780 | // fallback is everyone rights | 776 | // fallback is everyone rights |
781 | effectivePerms = task.ParentGroup.GetEffectivePermissions(); | ||
782 | returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); | 777 | returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); |
783 | returnMask &= effectivePerms; | ||
784 | if (taskOwnerID != UUID.Zero) | 778 | if (taskOwnerID != UUID.Zero) |
785 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; | 779 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; |
786 | return returnMask; | 780 | return returnMask; |