From 17a0474c5f62d883c365b81d44b9626a71d8b49a Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Wed, 3 Dec 2008 19:45:35 +0000 Subject: Fixes Mantis#2744: Permissions returned false for resetting scripts in non-root SOPs. Now, they will use the SOG the SOP belongs to. --- .../Environment/Modules/World/Permissions/PermissionsModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 1fe7df7..d486da4 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs @@ -1442,6 +1442,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; + SceneObjectPart part = m_scene.GetSceneObjectPart(prim); + + // If we selected a sub-prim to reset, prim won't represent the object, but only a part. + // We have to check the permissions of the object, though. + if (part.ParentID != 0) prim = part.ParentUUID; + // You can reset the scripts in any object you can edit return GenericObjectPermission(agentID, prim, false); } -- cgit v1.1