aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2017-01-19 12:35:00 +0000
committerUbitUmarov2017-01-19 12:35:00 +0000
commit673bd3721948b376d6be14e346d616863ca943cf (patch)
treec6ddbb14830cffd04122d5c90cdc929a88c8e8ab /OpenSim/Region/CoreModules
parentobject Take and TakeCopy are for in scene SOPs and SPs and permitions module ... (diff)
downloadopensim-SC-673bd3721948b376d6be14e346d616863ca943cf.zip
opensim-SC-673bd3721948b376d6be14e346d616863ca943cf.tar.gz
opensim-SC-673bd3721948b376d6be14e346d616863ca943cf.tar.bz2
opensim-SC-673bd3721948b376d6be14e346d616863ca943cf.tar.xz
object CanMove is for in scene SOGs Icleints and SPs and permitions module is NOT a shared module
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs21
1 files changed, 7 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 3f310c7..4f62827 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -1420,28 +1420,21 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1420 return GenericEstatePermission(user); 1420 return GenericEstatePermission(user);
1421 } 1421 }
1422 1422
1423 private bool CanMoveObject(UUID objectID, UUID moverID, Scene scene) 1423 private bool CanMoveObject(SceneObjectGroup sog, ScenePresence sp)
1424 { 1424 {
1425 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1425 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1426
1427 if(sog == null || sog.IsDeleted || sp == null || sp.IsDeleted)
1428 return false;
1429
1426 if (m_bypassPermissions) 1430 if (m_bypassPermissions)
1427 { 1431 {
1428 SceneObjectPart part = scene.GetSceneObjectPart(objectID); 1432 if (sog.OwnerID != sp.UUID && sog.IsAttachment)
1429 if(part == null)
1430 return false; 1433 return false;
1431
1432 if (part.OwnerID != moverID)
1433 {
1434 if (part.ParentGroup.IsDeleted || part.ParentGroup.IsAttachment)
1435 return false;
1436 }
1437 return m_bypassPermissionsValue; 1434 return m_bypassPermissionsValue;
1438 } 1435 }
1439 1436
1440 SceneObjectGroup sog = scene.GetGroupByPrim(objectID); 1437 uint perms = GetObjectPermissions(sp, sog, true);
1441 if (sog == null)
1442 return false;
1443
1444 uint perms = GetObjectPermissions(moverID, sog, true);
1445 if((perms & (uint)PermissionMask.Move) == 0) 1438 if((perms & (uint)PermissionMask.Move) == 0)
1446 return false; 1439 return false;
1447 return true; 1440 return true;