aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorUbitUmarov2017-05-03 21:12:16 +0100
committerUbitUmarov2017-05-03 21:12:16 +0100
commitd62aed7f468d50a3b1f9ee678be9ba66d77a9218 (patch)
tree77d0c937e568d1ab21c82b813b07127337918814 /OpenSim/Region/CoreModules/World
parentfix right to change permissions of group owned taskitems (diff)
downloadopensim-SC-d62aed7f468d50a3b1f9ee678be9ba66d77a9218.zip
opensim-SC-d62aed7f468d50a3b1f9ee678be9ba66d77a9218.tar.gz
opensim-SC-d62aed7f468d50a3b1f9ee678be9ba66d77a9218.tar.bz2
opensim-SC-d62aed7f468d50a3b1f9ee678be9ba66d77a9218.tar.xz
fix right to change permissions of group owned objects
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs33
1 files changed, 32 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 4c4a8a5..45c1c56 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -293,6 +293,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
293 scenePermissions.OnDeleteObject += CanDeleteObject; 293 scenePermissions.OnDeleteObject += CanDeleteObject;
294 scenePermissions.OnEditObjectByIDs += CanEditObjectByIDs; 294 scenePermissions.OnEditObjectByIDs += CanEditObjectByIDs;
295 scenePermissions.OnEditObject += CanEditObject; 295 scenePermissions.OnEditObject += CanEditObject;
296 scenePermissions.OnEditObjectPerms += CanEditObjectPerms;
296 scenePermissions.OnInventoryTransfer += CanInventoryTransfer; 297 scenePermissions.OnInventoryTransfer += CanInventoryTransfer;
297 scenePermissions.OnMoveObject += CanMoveObject; 298 scenePermissions.OnMoveObject += CanMoveObject;
298 scenePermissions.OnTakeObject += CanTakeObject; 299 scenePermissions.OnTakeObject += CanTakeObject;
@@ -391,6 +392,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
391 scenePermissions.OnDeleteObject -= CanDeleteObject; 392 scenePermissions.OnDeleteObject -= CanDeleteObject;
392 scenePermissions.OnEditObjectByIDs -= CanEditObjectByIDs; 393 scenePermissions.OnEditObjectByIDs -= CanEditObjectByIDs;
393 scenePermissions.OnEditObject -= CanEditObject; 394 scenePermissions.OnEditObject -= CanEditObject;
395 scenePermissions.OnEditObjectPerms -= CanEditObjectPerms;
394 scenePermissions.OnInventoryTransfer -= CanInventoryTransfer; 396 scenePermissions.OnInventoryTransfer -= CanInventoryTransfer;
395 scenePermissions.OnMoveObject -= CanMoveObject; 397 scenePermissions.OnMoveObject -= CanMoveObject;
396 scenePermissions.OnTakeObject -= CanTakeObject; 398 scenePermissions.OnTakeObject -= CanTakeObject;
@@ -1387,6 +1389,35 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1387 return true; 1389 return true;
1388 } 1390 }
1389 1391
1392 private bool CanEditObjectPerms(SceneObjectGroup sog, UUID userID)
1393 {
1394 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1395 if (m_bypassPermissions) return m_bypassPermissionsValue;
1396
1397 if (sog == null)
1398 return false;
1399
1400 if(sog.OwnerID == userID || IsAdministrator(userID))
1401 return true;
1402
1403 UUID sogGroupID = sog.GroupID;
1404 if(sogGroupID == UUID.Zero || sogGroupID != sog.OwnerID)
1405 return false;
1406
1407 uint perms = sog.EffectiveOwnerPerms;
1408 if((perms & (uint)PermissionMask.Modify) == 0)
1409 return false;
1410
1411 ulong powers = 0;
1412 if(GroupMemberPowers(sogGroupID, userID, ref powers))
1413 {
1414 if((powers & (ulong)GroupPowers.ObjectManipulate) != 0)
1415 return true;
1416 }
1417
1418 return false;
1419 }
1420
1390 private bool CanEditObjectInventory(UUID objectID, UUID userID) 1421 private bool CanEditObjectInventory(UUID objectID, UUID userID)
1391 { 1422 {
1392 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1423 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
@@ -2306,7 +2337,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
2306 ulong powers = 0; 2337 ulong powers = 0;
2307 if(GroupMemberPowers(sogGroupID, userID, ref powers)) 2338 if(GroupMemberPowers(sogGroupID, userID, ref powers))
2308 { 2339 {
2309 if(powers == (ulong)GroupPowers.ObjectManipulate) 2340 if((powers & (ulong)GroupPowers.ObjectManipulate) != 0)
2310 return true; 2341 return true;
2311 2342
2312 if((ti.EveryonePermissions & (uint)PermissionMask.Copy) != 0) 2343 if((ti.EveryonePermissions & (uint)PermissionMask.Copy) != 0)