Custom Roles

Posted by Community Admin on 03-Aug-2018 20:53

Custom Roles

All Replies

Posted by Community Admin on 07-Oct-2010 00:00

I know that there are two classes I can extended to provide custom roles: SitefinityRoleProvider (compatible with ASP.NET) and RoleDataProvider. When I extended RoleDataProvider, then I can see my custom roles in the admin interface, but I can't use them in ASP.NET forms (together with membership class). But when I extend SitefinityRoleProvider, then I can successfully use custom role (and membership) in the login form, but administrative tool doesn't list them then. What would be correct way?


Since I need separate form for public users, I have to use custom role and membership provider classes. And since I have to use them with Login form, I have to extend ASP.NET compatible ones.

Posted by Community Admin on 08-Oct-2010 00:00

Hello Max,

You could inherit from OpenAccessRoleProvider which is implementation of RoleDataProvider. The provider uses OpenAccess as an underlying storage. For some completely custom solutions you could inherit from RoleDataProvider and implement your own provider - for instance XML data provider.

SitefinityRoleProvider is a "wrapper" for the standard ASP.NET RoleProvider. The RoleManager class initialize providers of type SitefinityRoleProvider which can be declared in the root web.config file.


Sincerely yours,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 08-Oct-2010 00:00

Thanks, Ivan. That's what I did in the end: I extended RoleDataProvider.

This thread is closed