C# Class Test.CustomerExample.BO.AuthorisationStub

This class is a very simple stub implementation of IBusinessObjectAuthorisation. It is not intended to represent how a read authorisation policy would be implemented by is instead used only for testing.
Inheritance: IBusinessObjectAuthorisation
Afficher le fichier Open project: Chillisoft/habanero Class Usage Examples

Méthodes publiques

Méthode Description
AddAuthorisedRole ( string role, BusinessObjectActions actionToPerform ) : void

This is a public method to be used for setting up tests.

IsAuthorised ( BusinessObjectActions actionToPerform ) : bool

Whether the user is authorised to perform this action or not. This is an implementation of the IBusinessObjectAuthorisation method.

Method Details

AddAuthorisedRole() public méthode

This is a public method to be used for setting up tests.
public AddAuthorisedRole ( string role, BusinessObjectActions actionToPerform ) : void
role string the role that the user must be a member of
actionToPerform BusinessObjectActions The action that can be performed by a user of this role
Résultat void

IsAuthorised() public méthode

Whether the user is authorised to perform this action or not. This is an implementation of the IBusinessObjectAuthorisation method.
public IsAuthorised ( BusinessObjectActions actionToPerform ) : bool
actionToPerform BusinessObjectActions
Résultat bool