From c673ef7e3cd5d9bb4d06094229d5a0647f49a36e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 22 Jan 2017 23:05:39 +0000 Subject: replace calls to SOG.GetEffectivePermissions() by the new SOG.EffectiveOwnerPerms, some of those inline permissions checks should be reviewed and pass by permissions module --- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 2 +- OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | 4 ++-- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- .../OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 3aca741..8c0edc8 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -1650,7 +1650,7 @@ namespace OpenSim.Region.CoreModules.World.Land foreach (SceneObjectGroup obj in primsOverMe) { if (obj.OwnerID == previousOwner && obj.GroupID == UUID.Zero && - (obj.GetEffectivePermissions() & (uint)(OpenSim.Framework.PermissionMask.Transfer)) != 0) + (obj.EffectiveOwnerPerms & (uint)(OpenSim.Framework.PermissionMask.Transfer)) != 0) m_BuySellModule.BuyObject(sp.ControllingClient, UUID.Zero, obj.LocalId, 1, 0); } } diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 4542bbf..504a584 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs @@ -127,7 +127,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell switch (saleType) { case 1: // Sell as original (in-place sale) - uint effectivePerms = group.GetEffectivePermissions(); + uint effectivePerms = group.EffectiveOwnerPerms; if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) { @@ -174,7 +174,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group); group.AbsolutePosition = originalPosition; - uint perms = group.GetEffectivePermissions(); + uint perms = group.EffectiveOwnerPerms; if ((perms & (uint)PermissionMask.Transfer) == 0) { diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ca298be..4fca4ed 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2770,7 +2770,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectGroup sog = (SceneObjectGroup)e; if (sog != null && !sog.IsAttachment) { - if (!exceptNoCopy || ((sog.GetEffectivePermissions() & (uint)PermissionMask.Copy) != 0)) + if (!exceptNoCopy || ((sog.EffectiveOwnerPerms & (uint)PermissionMask.Copy) != 0)) { DeleteSceneObject((SceneObjectGroup)e, false); } diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs index 2bb48ad..92b5831 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs @@ -159,7 +159,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments if (target.UUID != hostgroup.OwnerID) { - uint effectivePerms = hostgroup.GetEffectivePermissions(); + uint effectivePerms = hostgroup.EffectiveOwnerPerms; if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) return 0; -- cgit v1.1