diff options
Diffstat (limited to 'OpenSim/Framework/ACL.cs')
-rw-r--r-- | OpenSim/Framework/ACL.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Framework/ACL.cs b/OpenSim/Framework/ACL.cs index 9d7827e..3b1c0f0 100644 --- a/OpenSim/Framework/ACL.cs +++ b/OpenSim/Framework/ACL.cs | |||
@@ -46,6 +46,11 @@ namespace OpenSim.Framework | |||
46 | private Dictionary<string, Resource> Resources = new Dictionary<string, Resource>(); | 46 | private Dictionary<string, Resource> Resources = new Dictionary<string, Resource>(); |
47 | private Dictionary<string, Role> Roles = new Dictionary<string, Role>(); | 47 | private Dictionary<string, Role> Roles = new Dictionary<string, Role>(); |
48 | 48 | ||
49 | /// <summary> | ||
50 | /// Adds a new role | ||
51 | /// </summary> | ||
52 | /// <param name="role"></param> | ||
53 | /// <returns></returns> | ||
49 | public ACL AddRole(Role role) | 54 | public ACL AddRole(Role role) |
50 | { | 55 | { |
51 | if (Roles.ContainsKey(role.Name)) | 56 | if (Roles.ContainsKey(role.Name)) |
@@ -56,6 +61,11 @@ namespace OpenSim.Framework | |||
56 | return this; | 61 | return this; |
57 | } | 62 | } |
58 | 63 | ||
64 | /// <summary> | ||
65 | /// Adds a new resource | ||
66 | /// </summary> | ||
67 | /// <param name="resource"></param> | ||
68 | /// <returns></returns> | ||
59 | public ACL AddResource(Resource resource) | 69 | public ACL AddResource(Resource resource) |
60 | { | 70 | { |
61 | Resources.Add(resource.Name, resource); | 71 | Resources.Add(resource.Name, resource); |
@@ -63,6 +73,12 @@ namespace OpenSim.Framework | |||
63 | return this; | 73 | return this; |
64 | } | 74 | } |
65 | 75 | ||
76 | /// <summary> | ||
77 | /// Permision for user/roll on a resource | ||
78 | /// </summary> | ||
79 | /// <param name="role"></param> | ||
80 | /// <param name="resource"></param> | ||
81 | /// <returns></returns> | ||
66 | public Permission HasPermission(string role, string resource) | 82 | public Permission HasPermission(string role, string resource) |
67 | { | 83 | { |
68 | if (!Roles.ContainsKey(role)) | 84 | if (!Roles.ContainsKey(role)) |
@@ -234,6 +250,9 @@ namespace OpenSim.Framework | |||
234 | 250 | ||
235 | #region Tests | 251 | #region Tests |
236 | 252 | ||
253 | /// <summary> | ||
254 | /// ACL Test class | ||
255 | /// </summary> | ||
237 | internal class ACLTester | 256 | internal class ACLTester |
238 | { | 257 | { |
239 | public ACLTester() | 258 | public ACLTester() |