From 3fc2d86dfe9fa041097eb33a4d7d3660c72df373 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 4 Aug 2007 00:56:56 +0000 Subject: * More work on PermissionManager --- OpenSim/Region/Environment/PermissionManager.cs | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'OpenSim/Region/Environment/PermissionManager.cs') diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs index fc9e58d..e768d7f 100644 --- a/OpenSim/Region/Environment/PermissionManager.cs +++ b/OpenSim/Region/Environment/PermissionManager.cs @@ -20,6 +20,15 @@ namespace OpenSim.Region.Environment m_scene = world; } + public delegate void OnPermissionErrorDelegate(LLUUID user, string reason); + public event OnPermissionErrorDelegate OnPermissionError; + + protected virtual void SendPermissionError(LLUUID user, string reason) + { + if (OnPermissionError != null) + OnPermissionError(user, reason); + } + protected virtual bool IsAdministrator(LLUUID user) { return m_scene.RegionInfo.MasterAvatarAssignedUUID == user; @@ -104,5 +113,36 @@ namespace OpenSim.Region.Environment { return false; } + + public virtual bool CanEditEstateSettings(LLUUID user) + { + // Default: deny + bool canEdit = false; + + // Estate admins should be able to use estate tools + if (IsEstateManager(user)) + canEdit = true; + + // Administrators always have permission + if (IsAdministrator(user)) + canEdit = true; + + return canEdit; + } + + public virtual bool CanEditParcel(LLUUID user, Land parcel) + { + return false; + } + + public virtual bool CanSellParcel(LLUUID user, Land parcel) + { + return false; + } + + public virtual bool CanAbandonParcel(LLUUID user, Land parcel) + { + return false; + } } } -- cgit v1.1