Fixing an issue with output parameters that are of type IntPtr
[castle.git] / Experiments / Attic / Security / Castle.Services.Security / GenericExtendedPrincipal.cs
blobeed1e2ea9c52eb8d4ad01227f4afc3100c5b1e83
1 namespace Castle.Services.Security
3 using System;
4 using System.Security.Principal;
6 [Serializable]
7 public class GenericExtendedPrincipal : GenericPrincipal, IExtendedPrincipal
9 private readonly string[] permissions;
11 public GenericExtendedPrincipal(IIdentity identity, string[] roles, string[] permissions) : base(identity, roles)
13 this.permissions = permissions;
16 public bool HasPermission(String permissionName)
18 return Array.IndexOf(permissions, permissionName) != -1;