2003-06-28 Sebastien Pouliot <spouliot@videotron.ca>
[mono.git] / mcs / class / corlib / System.Security / SecurityManager.cs
1 //
2 // System.Security.SecurityManager.cs
3 //
4 // Author:
5 //      Nick Drochak(ndrochak@gol.com)
6 //
7 // (C) Nick Drochak
8 //
9
10 using System.Security.Policy;
11 using System.Collections;
12
13 namespace System.Security {
14
15         public sealed class SecurityManager {
16
17                 private static bool checkExecutionRights;
18                 private static bool securityEnabled;
19
20                 private SecurityManager () {}
21
22                 public static bool CheckExecutionRights {
23                         get { return checkExecutionRights; }
24                         set { checkExecutionRights = value; }
25                 }
26
27                 public static bool SecurityEnabled {
28                         get { return securityEnabled; }
29                         set { securityEnabled = value; }
30                 }
31
32                 [MonoTODO("Incomplete")]
33                 public static bool IsGranted (IPermission perm)
34                 {
35                         if (perm == null)
36                                 return false;
37                         if (!securityEnabled)
38                                 return true;
39                         return false;
40                 }
41
42                 [MonoTODO()]
43                 public static PolicyLevel LoadPolicyLevelFromFile (string path, PolicyLevelType type)
44                 {
45                         return null;
46                 }
47
48                 [MonoTODO()]
49                 public static PolicyLevel LoadPolicyLevelFromString (string str, PolicyLevelType type)
50                 {
51                         if (null == str)
52                                 throw new ArgumentNullException("str");
53                         return null;
54                 }
55
56                 [MonoTODO()]
57                 public static IEnumerator PolicyHierarchy ()
58                 {
59                         return null;
60                 }
61
62                 [MonoTODO()]
63                 public static PermissionSet ResolvePolicy (Evidence evidence)
64                 {
65                         return null;
66                 }
67
68                 [MonoTODO()]
69                 public static PermissionSet ResolvePolicy (Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, out PermissionSet denied)
70                 {
71                         denied = null;
72                         return null;
73                 }
74
75                 [MonoTODO()]
76                 public static IEnumerator ResolvePolicyGroups (Evidence evidence)
77                 {
78                         return null;
79                 }
80
81                 [MonoTODO()]
82                 public static void SavePolicy () {}
83
84                 [MonoTODO()]
85                 public static void SavePolicyLevel (PolicyLevel level) {}
86         }
87 }