aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorOren Hurvitz2014-04-16 13:02:03 +0300
committerOren Hurvitz2014-04-20 06:23:36 +0100
commit3185db7f94fca86bab72225703584a352cd4cee9 (patch)
treed38022e29c2389cad104cf4c31c496477dfd25f0 /OpenSim
parentFixed: the parcel flag "Allow Scripts from Group" should only check if the pa... (diff)
downloadopensim-SC_OLD-3185db7f94fca86bab72225703584a352cd4cee9.zip
opensim-SC_OLD-3185db7f94fca86bab72225703584a352cd4cee9.tar.gz
opensim-SC_OLD-3185db7f94fca86bab72225703584a352cd4cee9.tar.bz2
opensim-SC_OLD-3185db7f94fca86bab72225703584a352cd4cee9.tar.xz
Fixed: if a user belonged to the parcel's group then he was allowed to rez object in the parcel even if the flag "Create Objects by Group" was disabled
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs32
1 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 89e2b55..e961922 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -1452,29 +1452,29 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1452 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1452 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1453 if (m_bypassPermissions) return m_bypassPermissionsValue; 1453 if (m_bypassPermissions) return m_bypassPermissionsValue;
1454 1454
1455 bool permission = false;
1456
1457// m_log.DebugFormat("[PERMISSIONS MODULE]: Checking rez object at {0} in {1}", objectPosition, m_scene.Name); 1455// m_log.DebugFormat("[PERMISSIONS MODULE]: Checking rez object at {0} in {1}", objectPosition, m_scene.Name);
1458 1456
1459 ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); 1457 ILandObject parcel = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y);
1460 if (land == null) return false; 1458 if (parcel == null)
1461 1459 return false;
1462 if ((land.LandData.Flags & ((int)ParcelFlags.CreateObjects)) ==
1463 (int)ParcelFlags.CreateObjects)
1464 permission = true;
1465 1460
1466 if (IsAdministrator(owner)) 1461 if ((parcel.LandData.Flags & (uint)ParcelFlags.CreateObjects) != 0)
1467 { 1462 {
1468 permission = true; 1463 return true;
1469 } 1464 }
1470 1465 else if ((owner == parcel.LandData.OwnerID) || IsAdministrator(owner))
1471 // Powers are zero, because GroupPowers.AllowRez is not a precondition for rezzing objects
1472 if (GenericParcelPermission(owner, objectPosition, 0))
1473 { 1466 {
1474 permission = true; 1467 return true;
1468 }
1469 else if (((parcel.LandData.Flags & (uint)ParcelFlags.CreateGroupObjects) != 0)
1470 && (parcel.LandData.GroupID != UUID.Zero) && IsGroupMember(parcel.LandData.GroupID, owner, 0))
1471 {
1472 return true;
1473 }
1474 else
1475 {
1476 return false;
1475 } 1477 }
1476
1477 return permission;
1478 } 1478 }
1479 1479
1480 private bool CanRunConsoleCommand(UUID user, Scene requestFromScene) 1480 private bool CanRunConsoleCommand(UUID user, Scene requestFromScene)