replace calls to SOG.GetEffectivePermissions() by the new SOG.EffectiveOwnerPerms, some of those inline permissions checks should be reviewed and pass by permissions module

httptests
UbitUmarov 2017-01-22 23:05:39 +00:00
parent df035a4022
commit c673ef7e3c
4 changed files with 5 additions and 5 deletions

View File

@ -1650,7 +1650,7 @@ namespace OpenSim.Region.CoreModules.World.Land
foreach (SceneObjectGroup obj in primsOverMe) foreach (SceneObjectGroup obj in primsOverMe)
{ {
if (obj.OwnerID == previousOwner && obj.GroupID == UUID.Zero && 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); m_BuySellModule.BuyObject(sp.ControllingClient, UUID.Zero, obj.LocalId, 1, 0);
} }
} }

View File

@ -127,7 +127,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
switch (saleType) switch (saleType)
{ {
case 1: // Sell as original (in-place sale) case 1: // Sell as original (in-place sale)
uint effectivePerms = group.GetEffectivePermissions(); uint effectivePerms = group.EffectiveOwnerPerms;
if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) if ((effectivePerms & (uint)PermissionMask.Transfer) == 0)
{ {
@ -174,7 +174,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group); string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group);
group.AbsolutePosition = originalPosition; group.AbsolutePosition = originalPosition;
uint perms = group.GetEffectivePermissions(); uint perms = group.EffectiveOwnerPerms;
if ((perms & (uint)PermissionMask.Transfer) == 0) if ((perms & (uint)PermissionMask.Transfer) == 0)
{ {

View File

@ -2770,7 +2770,7 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectGroup sog = (SceneObjectGroup)e; SceneObjectGroup sog = (SceneObjectGroup)e;
if (sog != null && !sog.IsAttachment) 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); DeleteSceneObject((SceneObjectGroup)e, false);
} }

View File

@ -159,7 +159,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
if (target.UUID != hostgroup.OwnerID) if (target.UUID != hostgroup.OwnerID)
{ {
uint effectivePerms = hostgroup.GetEffectivePermissions(); uint effectivePerms = hostgroup.EffectiveOwnerPerms;
if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) if ((effectivePerms & (uint)PermissionMask.Transfer) == 0)
return 0; return 0;