Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (27 sloc) 1.244 kB
Registering into NHibernate
===========================
BEFORE creating the session factory, call the following:
Security.Configure(cfg, SecurityTableStructure.Schema);
Container Configuration
=======================
Rhino Security make use of Common Service Locator (http://www.codeplex.com/CommonServiceLocator), you need to set the ServiceLocator.SetLocatorProvider() to provide the following services:
* IAuthorizationService
* IAuthorizationRepository
* IPermissionsBuilderService
* IPermissionsService
ALL services must be TRANSIENT, and the container needs to provide access to the current ISession.
The following is an example of configuring Rhino Security using Windsor:
Kernel.Register(
Component.For<IAuthorizationService>()
.ImplementedBy<AuthorizationService>()
.Lifestyle.Is(Lifestyle.Transient),
Component.For<IAuthorizationRepository>()
.ImplementedBy<AuthorizationRepository>()
.Lifestyle.Is(Lifestyle.Transient),
Component.For<IPermissionsBuilderService>()
.ImplementedBy<PermissionsBuilderService>()
.Lifestyle.Is(Lifestyle.Transient),
Component.For<IPermissionsService>()
.ImplementedBy<PermissionsService>()
.Lifestyle.Is(Lifestyle.Transient)
);
Jump to Line
Something went wrong with that request. Please try again.