C# Class Serenity.Web.TransientGrantingPermissionService

Adds temporary granting support to any IPermissionService implementation
Register this class in your application start, to allow granting permissions temporarily. registrar.RegisterInstance<IPermissionService>(new TransientGrantingPermissionService(new MyPermissionService()))
Inheritance: IPermissionService, ITransientGrantor
Mostrar archivo Open project: volkanceylan/Serenity

Public Methods

Method Description
Grant ( ) : void

Grants specified permissions temporarily (or makes it look like)

GrantAll ( ) : void

Grants all permissions temporarily (or makes it look like)

HasPermission ( string permission ) : bool
TransientGrantingPermissionService ( IPermissionService permissionService ) : Serenity.Abstractions
UndoGrant ( ) : void

Undoes last grant or grant all operation

Private Methods

Method Description
GetGrantingStack ( bool createIfNull ) : Stack>

Method Details

Grant() public method

Grants specified permissions temporarily (or makes it look like)
public Grant ( ) : void
return void

GrantAll() public method

Grants all permissions temporarily (or makes it look like)
public GrantAll ( ) : void
return void

HasPermission() public method

public HasPermission ( string permission ) : bool
permission string
return bool

TransientGrantingPermissionService() public method

public TransientGrantingPermissionService ( IPermissionService permissionService ) : Serenity.Abstractions
permissionService IPermissionService
return Serenity.Abstractions

UndoGrant() public method

Undoes last grant or grant all operation
public UndoGrant ( ) : void
return void