diff options
author | UbitUmarov | 2017-07-28 17:36:40 +0100 |
---|---|---|
committer | UbitUmarov | 2017-07-28 17:36:40 +0100 |
commit | 21b71ff1d857239c919ad275db5aacbf0cb6331e (patch) | |
tree | dc08d6d95a8e1d88c84ccd458a2e2e8d814391a7 /OpenSim/Region/CoreModules/Framework | |
parent | mantis 8218 make Meshmerizer UseMeshiesPhysicsMesh defualt to true, to match ... (diff) | |
download | opensim-SC-21b71ff1d857239c919ad275db5aacbf0cb6331e.zip opensim-SC-21b71ff1d857239c919ad275db5aacbf0cb6331e.tar.gz opensim-SC-21b71ff1d857239c919ad275db5aacbf0cb6331e.tar.bz2 opensim-SC-21b71ff1d857239c919ad275db5aacbf0cb6331e.tar.xz |
partial mantis 8219; on creating or updating items (animationsets, wearables) that reference assets, and user does not have permissions on those, abort and warn, instead of silent invalition of the references to those assets, creating a broken item
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 | ||