Implement missing constructor
[mono.git] / mcs / class / corlib / System.Security.AccessControl / CryptoKeyAccessRule.cs
index f2a88157f5d019254c5f50ec01cd884960715450..c6b50fa077e151b5f2ac1c62b3cc139ad9c7bf6f 100644 (file)
@@ -1,10 +1,11 @@
 //
 // System.Security.AccessControl.CryptoKeyAccessRule implementation
 //
-// Author:
+// Authors:
 //     Dick Porter  <dick@ximian.com>
+//     Atsushi Enomoto  <atsushi@ximian.com>
 //
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.Security.Principal;
 
-namespace System.Security.AccessControl {
+namespace System.Security.AccessControl
+{
        public sealed class CryptoKeyAccessRule : AccessRule
        {
-               CryptoKeyRights cryptoKeyRights;
-               
                public CryptoKeyAccessRule (IdentityReference identity,
                                            CryptoKeyRights cryptoKeyRights,
                                            AccessControlType type)
+                       : base (identity, (int)cryptoKeyRights, false,
+                               InheritanceFlags.None, PropagationFlags.None, AccessControlType.Allow)
                {
-                       this.cryptoKeyRights = cryptoKeyRights;
                }
 
                public CryptoKeyAccessRule (string identity,
                                            CryptoKeyRights cryptoKeyRights,
                                            AccessControlType type)
+                       : this (new NTAccount (identity), cryptoKeyRights, type)
                {
-                       this.cryptoKeyRights = cryptoKeyRights;
                }
                
-               public CryptoKeyRights CryptoKeyRights
-               {
-                       get {
-                               return(cryptoKeyRights);
-                       }
+               public CryptoKeyRights CryptoKeyRights {
+                       get { return (CryptoKeyRights)AccessMask; }
                }
        }
 }
 
-#endif