Users & Roles

ZauberCMS uses the built in Identity system to .Net and Blazor, there are some quirks using it with Blazor, and you can read more below.

Identity

Users

Users lists everyone who has registered for your website, whether they are an admin or not. You can filter via role, and click on the user to edit their content (See below) or change their roles, to update their email address.

Roles

Roles work like any other .Net application, and you can create specific roles for specific use cases. When there are no users on the site (i.e. First install) the first user to register will be assigned an admin role and you will be redirected to the admin.

Any subsequent user who registers, will be assigned the default role (Member) that is set in the appSettings.

"NewUserStartingRole": "Member",

If you want users to use a different default role name, then change it here.

User & Role Content

Just like Content, you can assign Content Types to roles. So any user in a specific role will get that content.

This is different from the main content, as you can add many roles to a user, meaning the User will get all the properties from all Roles. If a role is removed, the properties are removed.

Querying / Getting Data

You use exactly the same syntax with a User as you do Content to get the data, read the below

Querying Data
Example of adding an RTE to a Role
Example of the RTE being shown on a User in the Admin role

Last updated