diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index f1409bb..788ed1c 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -299,15 +299,18 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
299 | else if ((CustomInventoryType)item.InvType == CustomInventoryType.AnimationSet) | 299 | else if ((CustomInventoryType)item.InvType == CustomInventoryType.AnimationSet) |
300 | { | 300 | { |
301 | AnimationSet animSet = new AnimationSet(data); | 301 | AnimationSet animSet = new AnimationSet(data); |
302 | if (!animSet.Validate(x => { | 302 | uint res = animSet.Validate(x => { |
303 | const int required = (int)(PermissionMask.Transfer | PermissionMask.Copy); | ||
303 | int perms = m_Scene.InventoryService.GetAssetPermissions(remoteClient.AgentId, x); | 304 | int perms = m_Scene.InventoryService.GetAssetPermissions(remoteClient.AgentId, x); |
304 | int required = (int)(PermissionMask.Transfer | PermissionMask.Copy); | 305 | // enforce previus perm rule |
305 | if ((perms & required) != required) | 306 | if ((perms & required) != required) |
306 | return false; | 307 | return 0; |
307 | return true; | 308 | return (uint) perms; |
308 | })) | 309 | }); |
310 | if(res == 0) | ||
309 | { | 311 | { |
310 | data = animSet.ToBytes(); | 312 | remoteClient.SendAgentAlertMessage("Not enought permissions on asset(s) referenced by animation set '{0}', update failed", false); |
313 | return UUID.Zero; | ||
311 | } | 314 | } |
312 | } | 315 | } |
313 | 316 | ||