C# Class Hero.Configuration.HeroConfig

Afficher le fichier Open project: Skookum/Hero

Méthodes publiques

Méthode 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 abilities ) : void

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 roles ) : void

Assign a set of roles to a user

UnregisterAbilities ( IRole role, IEnumerable abilities ) : void

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 roles ) : void

Unassign a set of roles to a user

Method Details

Can() public static méthode

Verify a user can perform the given ability. Primarily intended as syntatic sugar.
public static Can ( string userName, string ability ) : bool
userName string
ability string
Résultat bool

Cannot() public static méthode

Verify a user cannot perform the given ability. Primarily intended as syntatic sugar.
public static Cannot ( string userName, string ability ) : bool
userName string
ability string
Résultat bool

Initialize() public static méthode

public static Initialize ( IAbilityAuthorizationService authorizationService ) : void
authorizationService IAbilityAuthorizationService
Résultat void

RegisterAbilities() public static méthode

Assign a set of abilities to a role.
public static RegisterAbilities ( IRole role, IEnumerable abilities ) : void
role IRole The role that is to be inspected and if nescessary configured
abilities IEnumerable The abilities to assign the role if nescessary
Résultat void

RegisterAbility() public static méthode

Assign a set of abilities to a role.
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
Résultat void

RegisterRole() public static méthode

Assign a set of roles to a user
public static RegisterRole ( IUser user, IRole role ) : void
user IUser
role IRole
Résultat void

RegisterRoles() public static méthode

Assign a set of roles to a user
public static RegisterRoles ( IUser user, IEnumerable roles ) : void
user IUser
roles IEnumerable
Résultat void

UnregisterAbilities() public static méthode

Unassign a set of abilities to a role.
public static UnregisterAbilities ( IRole role, IEnumerable abilities ) : void
role IRole The role that is to be inspected and if nescessary configured
abilities IEnumerable The abilities to assign the role if nescessary
Résultat void

UnregisterAbility() public static méthode

Unassign a set of abilities to a role.
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
Résultat void

UnregisterRole() public static méthode

Unassign a set of roles to a user
public static UnregisterRole ( IUser user, IRole role ) : void
user IUser
role IRole
Résultat void

UnregisterRoles() public static méthode

Unassign a set of roles to a user
public static UnregisterRoles ( IUser user, IEnumerable roles ) : void
user IUser
roles IEnumerable
Résultat void