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
parent
a780e01a54
commit
3185db7f94
OpenSim/Region/CoreModules/World/Permissions
|
@ -1452,29 +1452,29 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||||
|
|
||||||
bool permission = false;
|
|
||||||
|
|
||||||
// m_log.DebugFormat("[PERMISSIONS MODULE]: Checking rez object at {0} in {1}", objectPosition, m_scene.Name);
|
// m_log.DebugFormat("[PERMISSIONS MODULE]: Checking rez object at {0} in {1}", objectPosition, m_scene.Name);
|
||||||
|
|
||||||
ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y);
|
ILandObject parcel = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y);
|
||||||
if (land == null) return false;
|
if (parcel == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
if ((land.LandData.Flags & ((int)ParcelFlags.CreateObjects)) ==
|
if ((parcel.LandData.Flags & (uint)ParcelFlags.CreateObjects) != 0)
|
||||||
(int)ParcelFlags.CreateObjects)
|
|
||||||
permission = true;
|
|
||||||
|
|
||||||
if (IsAdministrator(owner))
|
|
||||||
{
|
{
|
||||||
permission = true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if ((owner == parcel.LandData.OwnerID) || IsAdministrator(owner))
|
||||||
// Powers are zero, because GroupPowers.AllowRez is not a precondition for rezzing objects
|
|
||||||
if (GenericParcelPermission(owner, objectPosition, 0))
|
|
||||||
{
|
{
|
||||||
permission = true;
|
return true;
|
||||||
|
}
|
||||||
|
else if (((parcel.LandData.Flags & (uint)ParcelFlags.CreateGroupObjects) != 0)
|
||||||
|
&& (parcel.LandData.GroupID != UUID.Zero) && IsGroupMember(parcel.LandData.GroupID, owner, 0))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return permission;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CanRunConsoleCommand(UUID user, Scene requestFromScene)
|
private bool CanRunConsoleCommand(UUID user, Scene requestFromScene)
|
||||||
|
|
Loading…
Reference in New Issue