Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • almir 11 posts 26 karma points
    Aug 10, 2009 @ 11:35
    almir
    0

    Custom memmbership/role provider bug

    I added custom membership and role provider to an umbraco site.

    The first thing I noticed is that "Member Type" and "Member Groups" nodes disappeared in the administration panel. Instead there is a Role node which is all fine as far as I am concerned.

    There is a bug however, when I try to edit a member, there is panel "Member Group" that has two textboxes. The right side text box will load all roles from the role provider. If I move any entries to the left side textbox and try to save changes, umbraco will try to remove the user from the roles listed in the left side box. The methods for adding user to a role are never called.

    Umbraco version 4.021
    Tested on:
    Vista and IIS 7
    WIndows Server 2003 and IIS 6

    Relevant web.config entries (sanitized):

    <roleManager enabled="true" defaultProvider="NameRoleProvider">

      <providers>

        <clear/>

        <add applicationName="MyApp" name="NameRoleProvider" type="MembershipRoleProviders.Name.Providers.NameRoleProvider"

     

    connectionStringName="MembershipRoleProviders.My.MySettings.NameProvidersConnectionString"/>

      </providers>

    </roleManager>

     

    <membership defaultProvider="NameMembershipProvider">

      <providers>

        <clear/>

        <add name="NameMembershipProvider" type="MembershipRoleProviders.Name.Providers.NameMembershipProvider"

     

    connectionStringName="MembershipRoleProviders.My.MySettings.NameProvidersConnectionString" defaultMemberTypeAlias="admin" />

        <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" />

      </providers>

     

    </membership> 

    I am trying to implement a single provder membership/role provider for multiple umbraco sites. Each site will have protected contend displayed according to the roles assigned to each usetr. Any help with this problem will be greatly appreciated.


     

  • almir 11 posts 26 karma points
    Aug 10, 2009 @ 15:21
    almir
    0

    Solved it, the error was in the implementation of IsUserInRole method.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft