Roles in Quanta

The Roles in Quanta

Each user, in Quanta, can be assigned one or more roles.

Quanta supports node-level access control, meaning that - for each node - you can decide exactly which roles can or can not do.


Default Quanta Roles

A fresh quanta installation supports those roles by default:

Quanta roles are nothing else than nodes / folders, and they are created in the _roles folder.

📂  _roles
  • 📁  logged
    • 📁  anonymous
      • 📁  admin

        Additionally, there are two system roles that are automatically assigned to users:

        logged - assigned to logged-in user

        anonymous - assigned to anonymous/guest users


        Those system roles are not contained into a folder, and therefore they are not editable or alterable in any way.


        Creating a custom Role

        So you can create anytime a new custom role (i.e. "editor"), by adding a new node inside the _roles folder.


        Assigning a Role to an user

        A visual form to assign roles to users, is envisioned, but still work in progress (see this issue).

        At the moment, an user's roles are stored in the data.json of the user, under the "roles".

        I.e. see:

        This user has been assigned the "admin" and "editor" roles. 



        Using roles to change a node's permissions

        Node's permissions, at the moment, are:

        view - view the node

        add - add another node inside the node

        edit - edit the node

        delete - delete the node


        When editing a node using the Shadow form, the "manage permissions" tab (if it's not excluded from the form) will look more or less like this:

        roles in quanta

        Here you can define which role can do what - in the specific node being edited.

        The Inherit value means: "no specific role has been set for this permission on this node. Use the permission that have been set on this node's father instead".

        Note that if all nodes are set to inherit, the permission will be granted by default.