//
// 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