aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/ACL.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/General/ACL.cs')
-rw-r--r--OpenSim/Framework/General/ACL.cs22
1 files changed, 14 insertions, 8 deletions
diff --git a/OpenSim/Framework/General/ACL.cs b/OpenSim/Framework/General/ACL.cs
index 348f0ae..0e9df19 100644
--- a/OpenSim/Framework/General/ACL.cs
+++ b/OpenSim/Framework/General/ACL.cs
@@ -27,7 +27,6 @@
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text;
31 30
32namespace OpenSim.Framework 31namespace OpenSim.Framework
33{ 32{
@@ -37,15 +36,15 @@ namespace OpenSim.Framework
37 // permissions rather than just the first. Deny permissions will 36 // permissions rather than just the first. Deny permissions will
38 // override all others. 37 // override all others.
39 38
40
41 #region ACL Core Class 39 #region ACL Core Class
40
42 /// <summary> 41 /// <summary>
43 /// Access Control List Engine 42 /// Access Control List Engine
44 /// </summary> 43 /// </summary>
45 public class ACL 44 public class ACL
46 { 45 {
47 Dictionary<string, Role> Roles = new Dictionary<string, Role>(); 46 private Dictionary<string, Role> Roles = new Dictionary<string, Role>();
48 Dictionary<string, Resource> Resources = new Dictionary<string, Resource>(); 47 private Dictionary<string, Resource> Resources = new Dictionary<string, Resource>();
49 48
50 public ACL AddRole(Role role) 49 public ACL AddRole(Role role)
51 { 50 {
@@ -114,9 +113,11 @@ namespace OpenSim.Framework
114 return this; 113 return this;
115 } 114 }
116 } 115 }
116
117 #endregion 117 #endregion
118 118
119 #region Exceptions 119 #region Exceptions
120
120 /// <summary> 121 /// <summary>
121 /// Thrown when an ACL attempts to add a duplicate role. 122 /// Thrown when an ACL attempts to add a duplicate role.
122 /// </summary> 123 /// </summary>
@@ -139,6 +140,7 @@ namespace OpenSim.Framework
139 return "This ACL already contains a role called '" + m_role.Name + "'."; 140 return "This ACL already contains a role called '" + m_role.Name + "'.";
140 } 141 }
141 } 142 }
143
142 #endregion 144 #endregion
143 145
144 #region Roles and Resources 146 #region Roles and Resources
@@ -146,7 +148,12 @@ namespace OpenSim.Framework
146 /// <summary> 148 /// <summary>
147 /// Does this Role have permission to access a specified Resource? 149 /// Does this Role have permission to access a specified Resource?
148 /// </summary> 150 /// </summary>
149 public enum Permission { Deny, None, Allow }; 151 public enum Permission
152 {
153 Deny,
154 None,
155 Allow
156 } ;
150 157
151 /// <summary> 158 /// <summary>
152 /// A role class, for use with Users or Groups 159 /// A role class, for use with Users or Groups
@@ -227,7 +234,7 @@ namespace OpenSim.Framework
227 234
228 #region Tests 235 #region Tests
229 236
230 class ACLTester 237 internal class ACLTester
231 { 238 {
232 public ACLTester() 239 public ACLTester()
233 { 240 {
@@ -249,9 +256,8 @@ namespace OpenSim.Framework
249 acl.GrantPermission("Guests", "CanBuild"); 256 acl.GrantPermission("Guests", "CanBuild");
250 257
251 acl.HasPermission("JoeGuest", "CanBuild"); 258 acl.HasPermission("JoeGuest", "CanBuild");
252
253 } 259 }
254 } 260 }
255 261
256 #endregion 262 #endregion
257} 263} \ No newline at end of file