Copied to clipboard

Flag this post as spam?

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


  • Simon 24 posts 127 karma points
    Oct 29, 2010 @ 17:07
    Simon
    0

    Can't delete roles after implementing custom role provider

    Hi

    I have created a custom role provider and now I have lost the option to delete or edit roles.  However I can create and assign them to users.

    When I say I can't delete them the problem is if I right click a role node I don't see the delete option. 

    Is this not supported or have I probably screwed up somewhere?

  • Simon 24 posts 127 karma points
    Nov 01, 2010 @ 10:24
    Simon
    0

    I switched back to the default role provider and it works again.  So definitely something to do with my custom provider, but i'm not sure what.  I've implmented all the methods.

    Is there anything else i'm missing?

  • Simon 24 posts 127 karma points
    Nov 02, 2010 @ 10:23
    Simon
    0

    Ok, anyone know how i would debug this?  Even with the delete methods throwing NotImplmentedExceptions I don't see any error messages.

    I'm guessing this problem occurs when loading the Member Group list and is caused by something else.

  • Daniel Ohrlund 1 post 31 karma points
    Mar 18, 2013 @ 14:08
    Daniel Ohrlund
    0

    I know this thread is very old but I faced the same problem today and found this post when I googled, so I thought I'd add post the answer just incase someone else ends up here.

    The reason the delete option does not show up is that in loadMemberGroups::Render each tree node is assigned menu options, and there exists a check that validates if the roleprovider beeing used has the same name as the default umbraco role provider. If the name of the provider differs the menu items are cleared, see below:

    XmlTreeNode xNode = XmlTreeNode.Create(this);
    ...
    if (!Member.IsUsingUmbracoRoles()) { xNode.Menu = null; }

    ..

    public static bool IsUsingUmbracoRoles() { return Roles.Provider.Name == UmbracoRoleProviderName; }

    ..

    public static readonly string UmbracoRoleProviderName = "UmbracoRoleProvider";

Please Sign in or register to post replies

Write your reply to:

Draft