Method | Description | |
---|---|---|
Can ( string userName, string ability ) : bool |
Verify a user can perform the given ability. Primarily intended as syntatic sugar.
|
|
Cannot ( string userName, string ability ) : bool |
Verify a user cannot perform the given ability. Primarily intended as syntatic sugar.
|
|
Initialize ( IAbilityAuthorizationService authorizationService ) : void | ||
RegisterAbilities ( IRole role, IEnumerable |
Assign a set of abilities to a role.
|
|
RegisterAbility ( IRole role, IAbility ability ) : void |
Assign a set of abilities to a role.
|
|
RegisterRole ( IUser user, IRole role ) : void |
Assign a set of roles to a user
|
|
RegisterRoles ( IUser user, IEnumerable |
Assign a set of roles to a user
|
|
UnregisterAbilities ( IRole role, IEnumerable |
Unassign a set of abilities to a role.
|
|
UnregisterAbility ( IRole role, IAbility ability ) : void |
Unassign a set of abilities to a role.
|
|
UnregisterRole ( IUser user, IRole role ) : void |
Unassign a set of roles to a user
|
|
UnregisterRoles ( IUser user, IEnumerable |
Unassign a set of roles to a user
|
public static Can ( string userName, string ability ) : bool | ||
userName | string | |
ability | string | |
return | bool |
public static Cannot ( string userName, string ability ) : bool | ||
userName | string | |
ability | string | |
return | bool |
public static Initialize ( IAbilityAuthorizationService authorizationService ) : void | ||
authorizationService | IAbilityAuthorizationService | |
return | void |
public static RegisterAbilities ( IRole role, IEnumerable |
||
role | IRole | The role that is to be inspected and if nescessary configured |
abilities | IEnumerable |
The abilities to assign the role if nescessary |
return | void |
public static RegisterAbility ( IRole role, IAbility ability ) : void | ||
role | IRole | The role that is to be inspected and if nescessary configured |
ability | IAbility | The ability to assign the role if nescessary |
return | void |
public static RegisterRole ( IUser user, IRole role ) : void | ||
user | IUser | |
role | IRole | |
return | void |
public static RegisterRoles ( IUser user, IEnumerable |
||
user | IUser | |
roles | IEnumerable |
|
return | void |
public static UnregisterAbilities ( IRole role, IEnumerable |
||
role | IRole | The role that is to be inspected and if nescessary configured |
abilities | IEnumerable |
The abilities to assign the role if nescessary |
return | void |
public static UnregisterAbility ( IRole role, IAbility ability ) : void | ||
role | IRole | The role that is to be inspected and if nescessary configured |
ability | IAbility | The abilities to assign the role if nescessary |
return | void |
public static UnregisterRole ( IUser user, IRole role ) : void | ||
user | IUser | |
role | IRole | |
return | void |
public static UnregisterRoles ( IUser user, IEnumerable |
||
user | IUser | |
roles | IEnumerable |
|
return | void |