aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/PermissionManager.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-08-04 00:56:56 +0000
committerAdam Frisby2007-08-04 00:56:56 +0000
commit3fc2d86dfe9fa041097eb33a4d7d3660c72df373 (patch)
tree19681ca3b3a1e339c4b636973f4533f981f47b37 /OpenSim/Region/Environment/PermissionManager.cs
parent* Little more cleaning of EstateManager - still needs packets to be moved, bu... (diff)
downloadopensim-SC_OLD-3fc2d86dfe9fa041097eb33a4d7d3660c72df373.zip
opensim-SC_OLD-3fc2d86dfe9fa041097eb33a4d7d3660c72df373.tar.gz
opensim-SC_OLD-3fc2d86dfe9fa041097eb33a4d7d3660c72df373.tar.bz2
opensim-SC_OLD-3fc2d86dfe9fa041097eb33a4d7d3660c72df373.tar.xz
* More work on PermissionManager
Diffstat (limited to 'OpenSim/Region/Environment/PermissionManager.cs')
-rw-r--r--OpenSim/Region/Environment/PermissionManager.cs40
1 files changed, 40 insertions, 0 deletions
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
20 m_scene = world; 20 m_scene = world;
21 } 21 }
22 22
23 public delegate void OnPermissionErrorDelegate(LLUUID user, string reason);
24 public event OnPermissionErrorDelegate OnPermissionError;
25
26 protected virtual void SendPermissionError(LLUUID user, string reason)
27 {
28 if (OnPermissionError != null)
29 OnPermissionError(user, reason);
30 }
31
23 protected virtual bool IsAdministrator(LLUUID user) 32 protected virtual bool IsAdministrator(LLUUID user)
24 { 33 {
25 return m_scene.RegionInfo.MasterAvatarAssignedUUID == user; 34 return m_scene.RegionInfo.MasterAvatarAssignedUUID == user;
@@ -104,5 +113,36 @@ namespace OpenSim.Region.Environment
104 { 113 {
105 return false; 114 return false;
106 } 115 }
116
117 public virtual bool CanEditEstateSettings(LLUUID user)
118 {
119 // Default: deny
120 bool canEdit = false;
121
122 // Estate admins should be able to use estate tools
123 if (IsEstateManager(user))
124 canEdit = true;
125
126 // Administrators always have permission
127 if (IsAdministrator(user))
128 canEdit = true;
129
130 return canEdit;
131 }
132
133 public virtual bool CanEditParcel(LLUUID user, Land parcel)
134 {
135 return false;
136 }
137
138 public virtual bool CanSellParcel(LLUUID user, Land parcel)
139 {
140 return false;
141 }
142
143 public virtual bool CanAbandonParcel(LLUUID user, Land parcel)
144 {
145 return false;
146 }
107 } 147 }
108} 148}