Revert "Simple build permissions feature. NOTE: EXPERIMENTAL, DISABLED BY DEFAULT. Turns out that this can't be expressed by cascading Permission modules, so I did it as per this patch."
This reverts commit 6146e7ef25
.
0.7.4.1
parent
6146e7ef25
commit
45b588cf00
|
@ -63,7 +63,6 @@ namespace OpenSim.Framework
|
||||||
bool ContainsPoint(int x, int y);
|
bool ContainsPoint(int x, int y);
|
||||||
|
|
||||||
ILandObject Copy();
|
ILandObject Copy();
|
||||||
ILandObject MemberwiseCopy();
|
|
||||||
|
|
||||||
void SendLandUpdateToAvatarsOverMe();
|
void SendLandUpdateToAvatarsOverMe();
|
||||||
|
|
||||||
|
@ -71,7 +70,6 @@ namespace OpenSim.Framework
|
||||||
void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client);
|
void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client);
|
||||||
bool IsEitherBannedOrRestricted(UUID avatar);
|
bool IsEitherBannedOrRestricted(UUID avatar);
|
||||||
bool IsBannedFromLand(UUID avatar);
|
bool IsBannedFromLand(UUID avatar);
|
||||||
bool IsAllowedInLand(UUID avatar);
|
|
||||||
bool IsRestrictedFromLand(UUID avatar);
|
bool IsRestrictedFromLand(UUID avatar);
|
||||||
void SendLandUpdateToClient(IClientAPI remote_client);
|
void SendLandUpdateToClient(IClientAPI remote_client);
|
||||||
void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
|
void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
|
||||||
|
|
|
@ -169,11 +169,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
return newLand;
|
return newLand;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ILandObject MemberwiseCopy()
|
|
||||||
{
|
|
||||||
return (ILandObject)this.MemberwiseClone();
|
|
||||||
}
|
|
||||||
|
|
||||||
static overrideParcelMaxPrimCountDelegate overrideParcelMaxPrimCount;
|
static overrideParcelMaxPrimCountDelegate overrideParcelMaxPrimCount;
|
||||||
static overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount;
|
static overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount;
|
||||||
|
|
||||||
|
@ -247,13 +242,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
m_lastSeqId = seq_id;
|
m_lastSeqId = seq_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
ILandObject landToSend = this;
|
|
||||||
m_scene.Permissions.LandObjectForClient(remote_client.AgentId, (ILandObject)this, out landToSend);
|
|
||||||
remote_client.SendLandProperties(seq_id,
|
remote_client.SendLandProperties(seq_id,
|
||||||
snap_selection, request_result, landToSend,
|
snap_selection, request_result, this,
|
||||||
(float)m_scene.RegionInfo.RegionSettings.ObjectBonus,
|
(float)m_scene.RegionInfo.RegionSettings.ObjectBonus,
|
||||||
GetParcelMaxPrimCount(),
|
GetParcelMaxPrimCount(),
|
||||||
GetSimulatorMaxPrimCount(), regionFlags);
|
GetSimulatorMaxPrimCount(), regionFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client)
|
public void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client)
|
||||||
|
@ -482,32 +475,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsAllowedInLand(UUID avatar)
|
|
||||||
{
|
|
||||||
ExpireAccessList();
|
|
||||||
|
|
||||||
if (m_scene.Permissions.IsAdministrator(avatar))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (m_scene.RegionInfo.EstateSettings.IsEstateManager(avatar))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (avatar == LandData.OwnerID)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (LandData.ParcelAccessList.FindIndex(
|
|
||||||
delegate(LandAccessEntry e)
|
|
||||||
{
|
|
||||||
if (e.AgentID == avatar && e.Flags == AccessList.Access)
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}) != -1)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SendLandUpdateToClient(IClientAPI remote_client)
|
public void SendLandUpdateToClient(IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
SendLandProperties(0, false, 0, remote_client);
|
SendLandProperties(0, false, 0, remote_client);
|
||||||
|
|
|
@ -94,9 +94,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
private bool m_RegionOwnerIsGod = false;
|
private bool m_RegionOwnerIsGod = false;
|
||||||
private bool m_RegionManagerIsGod = false;
|
private bool m_RegionManagerIsGod = false;
|
||||||
private bool m_ParcelOwnerIsGod = false;
|
private bool m_ParcelOwnerIsGod = false;
|
||||||
|
|
||||||
private bool m_SimpleBuildPermissions = false;
|
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The set of users that are allowed to create scripts. This is only active if permissions are not being
|
/// The set of users that are allowed to create scripts. This is only active if permissions are not being
|
||||||
/// bypassed. This overrides normal permissions.
|
/// bypassed. This overrides normal permissions.
|
||||||
|
@ -141,9 +139,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true);
|
m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true);
|
||||||
m_RegionManagerIsGod = myConfig.GetBoolean("region_manager_is_god", false);
|
m_RegionManagerIsGod = myConfig.GetBoolean("region_manager_is_god", false);
|
||||||
m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true);
|
m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true);
|
||||||
|
|
||||||
m_SimpleBuildPermissions = myConfig.GetBoolean("simple_build_permissions", false);
|
|
||||||
|
|
||||||
m_allowedScriptCreators
|
m_allowedScriptCreators
|
||||||
= ParseUserSetConfigSetting(myConfig, "allowed_script_creators", m_allowedScriptCreators);
|
= ParseUserSetConfigSetting(myConfig, "allowed_script_creators", m_allowedScriptCreators);
|
||||||
m_allowedScriptEditors
|
m_allowedScriptEditors
|
||||||
|
@ -210,9 +206,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia;
|
m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia;
|
||||||
m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia;
|
m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia;
|
||||||
|
|
||||||
if (m_SimpleBuildPermissions)
|
|
||||||
m_scene.Permissions.OnSendLandProperties += GenerateLandProperties;
|
|
||||||
|
|
||||||
m_scene.AddCommand("Users", this, "bypass permissions",
|
m_scene.AddCommand("Users", this, "bypass permissions",
|
||||||
"bypass permissions <true / false>",
|
"bypass permissions <true / false>",
|
||||||
"Bypass permission checks",
|
"Bypass permission checks",
|
||||||
|
@ -831,10 +824,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
permission = true;
|
permission = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_SimpleBuildPermissions &&
|
|
||||||
(parcel.LandData.Flags & (uint)ParcelFlags.UseAccessList) == 0 && parcel.IsAllowedInLand(user))
|
|
||||||
permission = true;
|
|
||||||
|
|
||||||
return permission;
|
return permission;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1977,24 +1966,5 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GenerateLandProperties(UUID userID, ILandObject realLand, out ILandObject landToSend)
|
|
||||||
{
|
|
||||||
landToSend = realLand;
|
|
||||||
if (m_bypassPermissions) return;
|
|
||||||
|
|
||||||
if (m_SimpleBuildPermissions &&
|
|
||||||
!m_scene.Permissions.IsAdministrator(userID) &&
|
|
||||||
!realLand.LandData.OwnerID.Equals(userID) &&
|
|
||||||
((realLand.LandData.Flags & (uint)ParcelFlags.UseAccessList) == 0 && realLand.IsAllowedInLand(userID)))
|
|
||||||
{
|
|
||||||
ILandObject clone = realLand.MemberwiseCopy();
|
|
||||||
LandData ldata = realLand.LandData.Copy();
|
|
||||||
clone.LandData = ldata;
|
|
||||||
clone.LandData.Flags |= (uint)(ParcelFlags.AllowAPrimitiveEntry | ParcelFlags.AllowFly | ParcelFlags.AllowOtherScripts | ParcelFlags.CreateObjects);
|
|
||||||
landToSend = clone;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public delegate bool TeleportHandler(UUID userID, Scene scene);
|
public delegate bool TeleportHandler(UUID userID, Scene scene);
|
||||||
public delegate bool ControlPrimMediaHandler(UUID userID, UUID primID, int face);
|
public delegate bool ControlPrimMediaHandler(UUID userID, UUID primID, int face);
|
||||||
public delegate bool InteractWithPrimMediaHandler(UUID userID, UUID primID, int face);
|
public delegate bool InteractWithPrimMediaHandler(UUID userID, UUID primID, int face);
|
||||||
public delegate void SendLandPropertiesHandler(UUID userID, ILandObject realLand, out ILandObject landToSend);
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public class ScenePermissions
|
public class ScenePermissions
|
||||||
|
@ -158,7 +157,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public event TeleportHandler OnTeleport;
|
public event TeleportHandler OnTeleport;
|
||||||
public event ControlPrimMediaHandler OnControlPrimMedia;
|
public event ControlPrimMediaHandler OnControlPrimMedia;
|
||||||
public event InteractWithPrimMediaHandler OnInteractWithPrimMedia;
|
public event InteractWithPrimMediaHandler OnInteractWithPrimMedia;
|
||||||
public event SendLandPropertiesHandler OnSendLandProperties;
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Object Permission Checks
|
#region Object Permission Checks
|
||||||
|
@ -1100,20 +1098,5 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LandObjectForClient(UUID userID, ILandObject realLand, out ILandObject landToSend)
|
|
||||||
{
|
|
||||||
landToSend = realLand;
|
|
||||||
SendLandPropertiesHandler handler = OnSendLandProperties;
|
|
||||||
if (handler != null)
|
|
||||||
{
|
|
||||||
Delegate[] list = handler.GetInvocationList();
|
|
||||||
foreach (SendLandPropertiesHandler h in list)
|
|
||||||
{
|
|
||||||
h(userID, realLand, out landToSend);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,14 +194,6 @@
|
||||||
; region_manager_is_god = false
|
; region_manager_is_god = false
|
||||||
; parcel_owner_is_god = true
|
; parcel_owner_is_god = true
|
||||||
|
|
||||||
;; More control over permissions
|
|
||||||
;; This is definitely not SL!
|
|
||||||
; Provides a simple control for land owners to give build rights to specific avatars
|
|
||||||
; in publicly accessible parcels that disallow object creation in general.
|
|
||||||
; Owners specific avatars by adding them to the Access List of the parcel
|
|
||||||
; without having to use the Groups feature
|
|
||||||
; simple_build_permissions = false
|
|
||||||
|
|
||||||
;; Default script engine to use. Currently, we only have XEngine
|
;; Default script engine to use. Currently, we only have XEngine
|
||||||
; DefaultScriptEngine = "XEngine"
|
; DefaultScriptEngine = "XEngine"
|
||||||
|
|
||||||
|
|
|
@ -260,13 +260,6 @@
|
||||||
; Default value is all
|
; Default value is all
|
||||||
; allowed_script_editors = all
|
; allowed_script_editors = all
|
||||||
|
|
||||||
; Provides a simple control for land owners to give build rights to
|
|
||||||
; publicly accessible parcels that disallow object creation in general.
|
|
||||||
; Owners specific avatars by adding them to the Access List of the parcel
|
|
||||||
; without having to use the Groups feature
|
|
||||||
; Disabled by default
|
|
||||||
; simple_build_permissions = False
|
|
||||||
|
|
||||||
; ##
|
; ##
|
||||||
; ## SCRIPT ENGINE
|
; ## SCRIPT ENGINE
|
||||||
; ##
|
; ##
|
||||||
|
|
Loading…
Reference in New Issue