CMS error when editing an user

I'm able to create users, assign roles, etc But once the user is created I cannot edit it. If I want to change its member's roles what I have been doing is to create a new user and remove the old. see screenshot below with the error message.

Any idea will be appreciated.

  • The 'Everyone' role is a default virtual role in Sitecore. It seems like there is an issue with that role for you in Sitecore. I'm not sure what can cause this issue, but looking at your log files may help?
  • In reply to Jaina Baumgartner:

    Hi Jaina,

    thanks for your response.

    There is nothing on the logs, it looks like the message comes before sending the request to the server.
    What I can tell you is that we have configured a custom membership provider as well as a role provider; I'll try to remove this and try again just to verify that this custom code is the cause.

    Any other idea in how to find out who is causing the error?

    Oscar
  • In reply to Oscar Giraldo:

    Hi Oscar,

    Can you please check if your old user assigned any role with name Everyone?

    As everyone role is not actual role it's a virtual role you can see this role on security editor only.

    All users are assigned the Everyone role.

    This role is a virtual role. It mirrors the Windows Everyone group. It does not exist in the role database but is only used for assigning and resolving security. You can use the Everyone role to assign access rights to every user or every user in a specific domain. The Everyone role is available as both a global role and a local role in every domain.

     

  • In reply to Yogesh Sharma:

    Hi Yogesh,

    thanks for your response.

    I removed our custom role provider and it looks like that is the one causing this issue.
    When I check the members tab before removing the custom provider, the 'Everyone' role shows under that tab but after removing the provider the 'Everyone' role is not showing anymore and I'm able to edit the user.

    What method should I override to either remove the 'Everyone' role? or add 'extranet\Everyone' instead?
    Please let me know what could be the best approach.

    Thanks again
    Oscar
  • In reply to Oscar Giraldo:

    Hi Oscar,

    You can write a class out of "Sitecore.Security.SitecoreRoleProvider" and override "GetAllRoles" that returns the roles to decide what to return.

    Something like this:

     

    string[] roles = base.GetAllRoles();

    //skip any role you do not want to return and manipulate "roles"

    return roles;



    Thanks

  • In reply to Debabrata Biswas:

    Hi Debabrata,

    I ignored 'Everyone' role on GetAllRoles() but still is showing the 'Everyone' role under 'member of' tab and throwing the error when trying to save the changes.

    If I remove the reference to the Custom Role Provider,I don't get the 'Everyone' role under 'member of' tab and saving changes works as expected.
    Any other method that I could override?

    Oscar
  • In reply to Oscar Giraldo:

    Hi Oscar,

    You can also override "GetRolesForUser". Also, make sure you edit the config file to replace

    <add name="sitecore" type="Sitecore.Security.SitecoreRoleProvider, Sitecore.Kernel" realProviderName="switcher" raiseEvents="true" />

    with

    <add name="sitecore" type="[your namespace.classname, your assembly]" realProviderName="switcher" raiseEvents="true" />

    Remember, you can also rename the role to include the domain you need. I do not have any such issues and not able to reproduce your issue, but just trying to help if it works for you.

    Thanks
  • In reply to Debabrata Biswas:

    Thanks again Debabrata,

    I'm still experiencing the same issue but for now I have set [ignoredUserDomains="sitecore"] on below line, and that basically allows me to ignore the custom role provider when editing sitecore users.

    <provider providerName="FormsRoleProvider" storeFullNames="true" wildcard="%" domains="extranet" ignoredUserDomains="" allowedUserDomains="" />

    Oscar