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/World | |
parent | add check for valid folded perms (diff) | |
download | opensim-SC-04117d9f75ca278a921be9ce09c8c859f81cd428.zip opensim-SC-04117d9f75ca278a921be9ce09c8c859f81cd428.tar.gz opensim-SC-04117d9f75ca278a921be9ce09c8c859f81cd428.tar.bz2 opensim-SC-04117d9f75ca278a921be9ce09c8c859f81cd428.tar.xz |
recover PermissionsUtil.ApplyFoldedPermissions (well my version). its use easys code readability
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | 18 |
1 files changed, 6 insertions, 12 deletions
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 | |||
208 | 208 | ||
209 | perms = group.GetEffectivePermissions(false); | 209 | perms = group.GetEffectivePermissions(false); |
210 | 210 | ||
211 | // if((perms & (uint)PermissionMask.FoldedMask) != 0) | 211 | PermissionsUtil.ApplyFoldedPermissions(perms, ref perms); |
212 | { | 212 | |
213 | if ((perms & (uint)PermissionMask.FoldedCopy) == 0) | ||
214 | perms &= ~(uint)PermissionMask.Copy; | ||
215 | if ((perms & (uint)PermissionMask.FoldedTransfer) == 0) | ||
216 | perms &= ~(uint)PermissionMask.Transfer; | ||
217 | if ((perms & (uint)PermissionMask.FoldedModify) == 0) | ||
218 | perms &= ~(uint)PermissionMask.Modify; | ||
219 | if ((perms & (uint)PermissionMask.FoldedExport) == 0) | ||
220 | perms &= ~(uint)PermissionMask.Export; | ||
221 | } | ||
222 | item.BasePermissions = perms & part.NextOwnerMask; | 213 | item.BasePermissions = perms & part.NextOwnerMask; |
223 | item.CurrentPermissions = perms & part.NextOwnerMask; | 214 | |
215 | // we need to rebuild folded here | ||
216 | |||
217 | item.CurrentPermissions = item.BasePermissions; | ||
224 | item.NextPermissions = part.NextOwnerMask; | 218 | item.NextPermissions = part.NextOwnerMask; |
225 | item.EveryOnePermissions = part.EveryoneMask & | 219 | item.EveryOnePermissions = part.EveryoneMask & |
226 | part.NextOwnerMask; | 220 | part.NextOwnerMask; |