Backend users

Topics: Developer Forum
Jun 14, 2008 at 1:35 PM

Hi,

Is it only possible to have 1 backend user account?
I tried to add a second user to the web.config but it seems that N2 only accepts the admin account.

<authentication mode="Forms">
    <forms loginUrl="edit/login.aspx" protection="All" timeout="30000" path="/">
        <credentials passwordFormat="Clear">
            <user name="admin" password="pass1" />
            <user name="editor" password="pass2" />
        </credentials>
    </forms>
</authentication>


/Carsten

Coordinator
Jun 14, 2008 at 2:46 PM
You can use the membership provider:

    <!-- These membership and role providers store their data as content items. You can also use the forms authentication credentials only (remove these sections) or the default ASP.NET providers (check your ASP.NET documentation) -->
    <membership defaultProvider="ContentMembershipProvider"><providers>
      <clear/>
      <add name="ContentMembershipProvider" type="N2.Security.ContentMembershipProvider, N2.Security" />
    </providers></membership>
    <roleManager enabled="true" defaultProvider="ContentRoleProvider"><providers>
      <clear/>
      <add name="ContentRoleProvider" type="N2.Security.ContentRoleProvider, N2.Security" />
    </providers></roleManager>

Jun 14, 2008 at 4:54 PM

Thank you for the quick reply libardo!

I’m trying to figure out how to setup users.
I have 2 types of users:

  1. Backend users, which can login and edit the webpages.
  2. Visitors, which can login at the frontend and view locked webpages.
    These users should not be able to login at the backend.

When using the N2 custom membership provider, all users are able to login at the backend.

Is that correct understood?

Coordinator
Jun 14, 2008 at 11:04 PM
What roles did you assign the registered visitors? Access to the backend is granted by the role "Editors" or "Administrators".
Jun 15, 2008 at 1:04 PM
That explains a lot… problem solved ;)

Thanks for the help!