aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Permissions
diff options
context:
space:
mode:
authorUbitUmarov2017-01-19 13:10:04 +0000
committerUbitUmarov2017-01-19 13:10:04 +0000
commit984345a2022ba805869990e0c495af08ffe40ce9 (patch)
tree3ce9db584eb319a4141cd930723c79a3a061f2e9 /OpenSim/Region/CoreModules/World/Permissions
parentfix a null check (diff)
downloadopensim-SC-984345a2022ba805869990e0c495af08ffe40ce9.zip
opensim-SC-984345a2022ba805869990e0c495af08ffe40ce9.tar.gz
opensim-SC-984345a2022ba805869990e0c495af08ffe40ce9.tar.bz2
opensim-SC-984345a2022ba805869990e0c495af08ffe40ce9.tar.xz
add CanEdit check for SOGs, iclients and SPs that need to be in scene and use it
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Permissions')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 4f62827..1c8d4b8 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -283,6 +283,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
283 m_scene.Permissions.OnIsEstateManager += IsEstateManager; 283 m_scene.Permissions.OnIsEstateManager += IsEstateManager;
284 m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; 284 m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
285 m_scene.Permissions.OnDeleteObject += CanDeleteObject; 285 m_scene.Permissions.OnDeleteObject += CanDeleteObject;
286 m_scene.Permissions.OnEditObjectByIDs += CanEditObjectByIDs;
286 m_scene.Permissions.OnEditObject += CanEditObject; 287 m_scene.Permissions.OnEditObject += CanEditObject;
287 m_scene.Permissions.OnEditParcelProperties += CanEditParcelProperties; 288 m_scene.Permissions.OnEditParcelProperties += CanEditParcelProperties;
288 m_scene.Permissions.OnInstantMessage += CanInstantMessage; 289 m_scene.Permissions.OnInstantMessage += CanInstantMessage;
@@ -1235,7 +1236,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1235 return true; 1236 return true;
1236 } 1237 }
1237 1238
1238 private bool CanEditObject(UUID objectID, UUID userID, Scene scene) 1239 private bool CanEditObjectByIDs(UUID objectID, UUID userID, Scene scene)
1239 { 1240 {
1240 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1241 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1241 if (m_bypassPermissions) return m_bypassPermissionsValue; 1242 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -1250,6 +1251,20 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1250 return true; 1251 return true;
1251 } 1252 }
1252 1253
1254 private bool CanEditObject(SceneObjectGroup sog, ScenePresence sp)
1255 {
1256 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1257 if (m_bypassPermissions) return m_bypassPermissionsValue;
1258
1259 if(sog == null || sog.IsDeleted || sp == null || sp.IsDeleted)
1260 return false;
1261
1262 uint perms = GetObjectPermissions(sp, sog, true);
1263 if((perms & (uint)PermissionMask.Modify) == 0)
1264 return false;
1265 return true;
1266 }
1267
1253 private bool CanEditObjectInventory(UUID objectID, UUID userID, Scene scene) 1268 private bool CanEditObjectInventory(UUID objectID, UUID userID, Scene scene)
1254 { 1269 {
1255 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1270 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);