diff options
author | UbitUmarov | 2017-04-29 19:07:04 +0100 |
---|---|---|
committer | UbitUmarov | 2017-04-29 19:07:04 +0100 |
commit | 04117d9f75ca278a921be9ce09c8c859f81cd428 (patch) | |
tree | 3a919f3e3d2eb3c0ea22bcb7fefa9fdd5e0541e0 /OpenSim/Region/CoreModules/Framework | |
parent | add check for valid folded perms (diff) | |
download | opensim-SC_OLD-04117d9f75ca278a921be9ce09c8c859f81cd428.zip opensim-SC_OLD-04117d9f75ca278a921be9ce09c8c859f81cd428.tar.gz opensim-SC_OLD-04117d9f75ca278a921be9ce09c8c859f81cd428.tar.bz2 opensim-SC_OLD-04117d9f75ca278a921be9ce09c8c859f81cd428.tar.xz |
recover PermissionsUtil.ApplyFoldedPermissions (well my version). its use easys code readability
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index d916cc2..bce0610 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -573,7 +573,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
573 | InventoryItemBase item, SceneObjectGroup so, List<SceneObjectGroup> objsForEffectivePermissions, | 573 | InventoryItemBase item, SceneObjectGroup so, List<SceneObjectGroup> objsForEffectivePermissions, |
574 | IClientAPI remoteClient) | 574 | IClientAPI remoteClient) |
575 | { | 575 | { |
576 | uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export) | 7; | 576 | uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export | PermissionMask.FoldedMask); |
577 | 577 | ||
578 | // For the porposes of inventory, an object is modify if the prims | 578 | // For the porposes of inventory, an object is modify if the prims |
579 | // are modify. This allows renaming an object that contains no | 579 | // are modify. This allows renaming an object that contains no |
@@ -586,19 +586,16 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
586 | 586 | ||
587 | effectivePerms &= groupPerms; | 587 | effectivePerms &= groupPerms; |
588 | } | 588 | } |
589 | effectivePerms |= (uint)PermissionMask.Move; | 589 | |
590 | |||
591 | if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) | 590 | if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) |
592 | { | 591 | { |
593 | if ((effectivePerms & (uint)PermissionMask.FoldedCopy) == 0) | 592 | PermissionsUtil.ApplyNoModFoldedPermissions(effectivePerms, ref effectivePerms); |
594 | effectivePerms &= ~(uint)PermissionMask.Copy; | 593 | |
595 | if ((effectivePerms & (uint)PermissionMask.FoldedTransfer) == 0) | ||
596 | effectivePerms &= ~(uint)PermissionMask.Transfer; | ||
597 | if ((effectivePerms & (uint)PermissionMask.FoldedExport) == 0) | ||
598 | effectivePerms &= ~(uint)PermissionMask.Export; | ||
599 | |||
600 | uint basePerms = effectivePerms & so.RootPart.NextOwnerMask; | 594 | uint basePerms = effectivePerms & so.RootPart.NextOwnerMask; |
601 | 595 | ||
596 | // rebuild folded perms since we don't have then on inworld objects | ||
597 | // possible existent ones where already unfolded | ||
598 | |||
602 | if((basePerms & (uint)PermissionMask.Copy) == 0) | 599 | if((basePerms & (uint)PermissionMask.Copy) == 0) |
603 | basePerms |= (uint)PermissionMask.Transfer; | 600 | basePerms |= (uint)PermissionMask.Transfer; |
604 | 601 | ||