From 04117d9f75ca278a921be9ce09c8c859f81cd428 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 29 Apr 2017 19:07:04 +0100 Subject: recover PermissionsUtil.ApplyFoldedPermissions (well my version). its use easys code readability --- .../CoreModules/World/Objects/BuySell/BuySellModule.cs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index f90285d..84f33d1 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs @@ -208,19 +208,13 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell perms = group.GetEffectivePermissions(false); -// if((perms & (uint)PermissionMask.FoldedMask) != 0) - { - if ((perms & (uint)PermissionMask.FoldedCopy) == 0) - perms &= ~(uint)PermissionMask.Copy; - if ((perms & (uint)PermissionMask.FoldedTransfer) == 0) - perms &= ~(uint)PermissionMask.Transfer; - if ((perms & (uint)PermissionMask.FoldedModify) == 0) - perms &= ~(uint)PermissionMask.Modify; - if ((perms & (uint)PermissionMask.FoldedExport) == 0) - perms &= ~(uint)PermissionMask.Export; - } + PermissionsUtil.ApplyFoldedPermissions(perms, ref perms); + item.BasePermissions = perms & part.NextOwnerMask; - item.CurrentPermissions = perms & part.NextOwnerMask; + +// we need to rebuild folded here + + item.CurrentPermissions = item.BasePermissions; item.NextPermissions = part.NextOwnerMask; item.EveryOnePermissions = part.EveryoneMask & part.NextOwnerMask; -- cgit v1.1