aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTeravus Ovares2008-03-19 18:32:25 +0000
committerTeravus Ovares2008-03-19 18:32:25 +0000
commit8d5bcc9da11534302b36bca75ba715d9bb4029c9 (patch)
treea8d191b212399611a75811caf7a55bcdeaf5666c
parent* Patch to add llSetLinkPrimitiveParams stub (diff)
downloadopensim-SC_OLD-8d5bcc9da11534302b36bca75ba715d9bb4029c9.zip
opensim-SC_OLD-8d5bcc9da11534302b36bca75ba715d9bb4029c9.tar.gz
opensim-SC_OLD-8d5bcc9da11534302b36bca75ba715d9bb4029c9.tar.bz2
opensim-SC_OLD-8d5bcc9da11534302b36bca75ba715d9bb4029c9.tar.xz
* 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.
-rw-r--r--OpenSim/Region/Environment/PermissionManager.cs34
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs2
2 files changed, 35 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs
index 3d008a7..a6acca7 100644
--- a/OpenSim/Region/Environment/PermissionManager.cs
+++ b/OpenSim/Region/Environment/PermissionManager.cs
@@ -405,6 +405,40 @@ namespace OpenSim.Region.Environment
405 permission = false; 405 permission = false;
406 406
407 } 407 }
408 else
409 {
410 bool locked = false;
411 if (!m_scene.Entities.ContainsKey(obj))
412 {
413 return false;
414 }
415
416 // If it's not an object, we cant edit it.
417 if ((!(m_scene.Entities[obj] is SceneObjectGroup)))
418 {
419 return false;
420 }
421
422
423 SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[obj];
424
425 LLUUID objectOwner = group.OwnerID;
426 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0);
427
428
429 // This is an exception to the generic object permission.
430 // Administrators who lock their objects should not be able to move them,
431 // however generic object permission should return true.
432 // This keeps locked objects from being affected by random click + drag actions by accident
433 // and allows the administrator to grab or delete a locked object.
434
435 // Administrators and estate managers are still able to click+grab locked objects not
436 // owned by them in the scene
437 // This is by design.
438
439 if (locked && (user == objectOwner))
440 return false;
441 }
408 return permission; 442 return permission;
409 } 443 }
410 444
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index a041a52..f37d28a 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -998,7 +998,7 @@ namespace OpenSim.Region.Environment.Scenes
998 SceneObjectGroup group = GetGroupByPrim(objectID); 998 SceneObjectGroup group = GetGroupByPrim(objectID);
999 if (group != null) 999 if (group != null)
1000 { 1000 {
1001 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID)) 1001 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))// && PermissionsMngr.)
1002 { 1002 {
1003 group.GrabMovement(offset, pos, remoteClient); 1003 group.GrabMovement(offset, pos, remoteClient);
1004 } 1004 }