* Fix for if 782: Locked prims may still be moved by click+drag.

* Remember, your admin user and estate managers can move locked objects that are not owned by them.  That functionality differs from the Linden way of thinking and it's by design! It is not a bug!  Create a non-god user and use that as your normal account.
0.6.0-stable
Teravus Ovares 2008-03-19 18:32:25 +00:00
parent f747687c8f
commit 8d5bcc9da1
2 changed files with 35 additions and 1 deletions

View File

@ -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;
}

View File

@ -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);
}