Implement missing constructor
[mono.git] / mcs / class / corlib / System.Security.AccessControl / CryptoKeyAccessRule.cs
index 773982ef9cc35ae6b63263d248bcd4dc467f5e3a..c6b50fa077e151b5f2ac1c62b3cc139ad9c7bf6f 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.Security.Principal;
 
 namespace System.Security.AccessControl
 {
        public sealed class CryptoKeyAccessRule : AccessRule
        {
-               CryptoKeyRights rights;
-               
                public CryptoKeyAccessRule (IdentityReference identity,
                                            CryptoKeyRights cryptoKeyRights,
                                            AccessControlType type)
-                       // FIXME: accessMask=0 likely causes an error
-                       : base (identity, 0, false, InheritanceFlags.None, PropagationFlags.None, AccessControlType.Allow)
+                       : base (identity, (int)cryptoKeyRights, false,
+                               InheritanceFlags.None, PropagationFlags.None, AccessControlType.Allow)
                {
-                       this.rights = cryptoKeyRights;
                }
 
                public CryptoKeyAccessRule (string identity,
                                            CryptoKeyRights cryptoKeyRights,
                                            AccessControlType type)
-                       : this (new SecurityIdentifier (identity), cryptoKeyRights, type)
+                       : this (new NTAccount (identity), cryptoKeyRights, type)
                {
                }
                
                public CryptoKeyRights CryptoKeyRights {
-                       get { return rights; }
+                       get { return (CryptoKeyRights)AccessMask; }
                }
        }
 }
 
-#endif