diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Permissions')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index b60cd93..4d2bfe5 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,6 +701,7 @@ 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; | ||
704 | UUID taskOwnerID = task.OwnerID; | 705 | UUID taskOwnerID = task.OwnerID; |
705 | UUID spID = sp.UUID; | 706 | UUID spID = sp.UUID; |
706 | 707 | ||
@@ -718,6 +719,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
718 | if(task.ParentGroup.IsAttachment) | 719 | if(task.ParentGroup.IsAttachment) |
719 | { | 720 | { |
720 | returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); | 721 | returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); |
722 | effectivePerms = task.ParentGroup.GetEffectivePermissions(); | ||
723 | returnMask &= effectivePerms; | ||
721 | if (taskOwnerID != UUID.Zero) | 724 | if (taskOwnerID != UUID.Zero) |
722 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; | 725 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; |
723 | return returnMask; | 726 | return returnMask; |
@@ -726,6 +729,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
726 | UUID taskGroupID = task.GroupID; | 729 | UUID taskGroupID = task.GroupID; |
727 | bool groupdOwned = taskOwnerID == taskGroupID; | 730 | bool groupdOwned = taskOwnerID == taskGroupID; |
728 | 731 | ||
732 | |||
729 | // if friends with rights then owner | 733 | // if friends with rights then owner |
730 | if (!groupdOwned && IsFriendWithPerms(spID, taskOwnerID)) | 734 | if (!groupdOwned && IsFriendWithPerms(spID, taskOwnerID)) |
731 | { | 735 | { |
@@ -753,9 +757,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
753 | returnMask |= (uint)PrimFlags.ObjectOwnerModify; | 757 | returnMask |= (uint)PrimFlags.ObjectOwnerModify; |
754 | return returnMask; | 758 | return returnMask; |
755 | } | 759 | } |
756 | else | 760 | else if(task.GroupMask != 0) |
757 | { | 761 | { |
758 | // group sharing or everyone | 762 | // group sharing |
759 | returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); | 763 | returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); |
760 | returnMask |= | 764 | returnMask |= |
761 | (uint)PrimFlags.ObjectGroupOwned | | 765 | (uint)PrimFlags.ObjectGroupOwned | |
@@ -763,9 +767,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
763 | return returnMask; | 767 | return returnMask; |
764 | } | 768 | } |
765 | } | 769 | } |
766 | else | 770 | else if(task.GroupMask != 0) |
767 | { | 771 | { |
768 | // group sharing or everyone | 772 | // group sharing |
769 | returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); | 773 | returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); |
770 | if (taskOwnerID != UUID.Zero) | 774 | if (taskOwnerID != UUID.Zero) |
771 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; | 775 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; |
@@ -774,7 +778,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
774 | } | 778 | } |
775 | 779 | ||
776 | // fallback is everyone rights | 780 | // fallback is everyone rights |
781 | effectivePerms = task.ParentGroup.GetEffectivePermissions(); | ||
777 | returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); | 782 | returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); |
783 | returnMask &= effectivePerms; | ||
778 | if (taskOwnerID != UUID.Zero) | 784 | if (taskOwnerID != UUID.Zero) |
779 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; | 785 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; |
780 | return returnMask; | 786 | return returnMask; |