More in this section

Forums / General Discussions / Custom Roles

Custom Roles

3 posts, 1 answered
  1. Max
    Max avatar
    9 posts
    Registered:
    29 Sep 2010
    07 Oct 2010
    Link to this post
    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.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 Oct 2010
    Link to this post
    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
    Answered
  3. Max
    Max avatar
    9 posts
    Registered:
    29 Sep 2010
    08 Oct 2010
    Link to this post
    Thanks, Ivan. That's what I did in the end: I extended RoleDataProvider.
3 posts, 1 answered