Last change
on this file since 3698 was
2100,
checked in by mbecirov, 15 years ago
|
#586: Fixed authorization when no policy scope is defined.
|
File size:
837 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Collections;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Hive.Server.Core {
|
---|
8 | public class PolicyCollection : IEnumerable<Policy> {
|
---|
9 | private IList<Policy> _policies = new List<Policy>();
|
---|
10 |
|
---|
11 | public IList<Policy> Policies { get { return this._policies; } }
|
---|
12 |
|
---|
13 | public Policy this[string name] {
|
---|
14 | get {
|
---|
15 | foreach (Policy item in _policies) {
|
---|
16 | if (item.Name == name)
|
---|
17 | return item;
|
---|
18 | }
|
---|
19 | return null;
|
---|
20 | }
|
---|
21 | }
|
---|
22 |
|
---|
23 | public IEnumerator<Policy> GetEnumerator() {
|
---|
24 | return this._policies.GetEnumerator();
|
---|
25 | }
|
---|
26 |
|
---|
27 | #region IEnumerable Members
|
---|
28 |
|
---|
29 | IEnumerator IEnumerable.GetEnumerator()
|
---|
30 | {
|
---|
31 | return this._policies.GetEnumerator();
|
---|
32 | }
|
---|
33 |
|
---|
34 | #endregion
|
---|
35 | }
|
---|
36 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.