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
Datei anzeigen Open project: Chillisoft/habanero Class Usage Examples

Public Methods

Method 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 method

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
return void

IsAuthorised() public method

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
return bool