1 namespace Castle
.Services
.Security
4 using System
.Security
.Principal
;
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;