diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs index 3d008a78f8..a6acca75aa 100644 --- a/OpenSim/Region/Environment/PermissionManager.cs +++ b/OpenSim/Region/Environment/PermissionManager.cs @@ -405,6 +405,40 @@ namespace OpenSim.Region.Environment permission = false; } + else + { + bool locked = false; + if (!m_scene.Entities.ContainsKey(obj)) + { + return false; + } + + // If it's not an object, we cant edit it. + if ((!(m_scene.Entities[obj] is SceneObjectGroup))) + { + return false; + } + + + SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[obj]; + + LLUUID objectOwner = group.OwnerID; + locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); + + + // This is an exception to the generic object permission. + // Administrators who lock their objects should not be able to move them, + // however generic object permission should return true. + // This keeps locked objects from being affected by random click + drag actions by accident + // and allows the administrator to grab or delete a locked object. + + // Administrators and estate managers are still able to click+grab locked objects not + // owned by them in the scene + // This is by design. + + if (locked && (user == objectOwner)) + return false; + } return permission; } diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index a041a529ec..f37d28a5b6 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -998,7 +998,7 @@ namespace OpenSim.Region.Environment.Scenes SceneObjectGroup group = GetGroupByPrim(objectID); if (group != null) { - if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID)) + if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))// && PermissionsMngr.) { group.GrabMovement(offset, pos, remoteClient); }