Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,075 of 9,075 pages
About the help in other languages
All help pages

Groups and roles

exp:user:groups lists, creates, renames, moves and deletes user groups; exp:user:roles lists, assigns and unassigns roles of a user or group, optionally limited to a subtree or section; exp:user:whoami says which…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/user-management-from-the-console/groups-and-roles.md

On this page

Groups and roles

A group and a role are named by node id or name, and by name or id. When two groups have the same name, use the node id.

What you'll have at the end

A user group tree that fits the site, the right roles on the right accounts and groups, and certainty about which account the console acts as.

User groups

./console exp:user:groups
./console exp:user:groups list Editors
./console exp:user:groups create --name="Regional editors" --parent=Editors --apply
./console exp:user:groups rename "Regional editors" --name="Local editors" --apply
./console exp:user:groups move "Local editors" --to=Members --apply
./console exp:user:groups delete "Local editors" --apply
ActionWhat it does
list (default)the user group tree below a group (default the top of the Users tree): node id, name, direct members, subgroups
createa new group named --name, below --parent (default the top of the Users tree)
rename <group>gives the group the name --name
move <group>moves the group below the group --to
delete <group>removes the group, as the administration removes it

delete refuses the top of the Users tree, and a group that still has members or subgroups. Move them first with exp:user:edit --add-group --remove-group or exp:user:groups move.

Roles

./console exp:user:roles list jane
./console exp:user:roles list group:Editors
./console exp:user:roles assign Editor group:"Local editors" --subtree=2345 --apply
./console exp:user:roles assign Anonymous jane --section=standard --apply
./console exp:user:roles unassign Editor group:"Local editors" --subtree=2345 --apply

The target is a user (login, e-mail address or id) or group:<node id or name>.

ActionWhat it does
list <target>the role assignments of the user or group, each with its limitation and where it comes from (the account or a group above it)
assign <role> <target>assigns the role; --subtree=<node id> or --section=<section id or identifier> limits it
unassign <role> <target>removes the role; with --subtree or --section only that limited assignment

The audit records access.role.assign and access.role.unassign. The role caches are cleared as in the administration, so the change applies at the next request.

Note: A role assigned to a group applies to every member at any depth. Prefer groups over single accounts: a person who changes jobs then only changes group.

Who the console acts as

./console exp:user:whoami
./console exp:user:whoami --as=jane

The command names the account the console acts as: the user of [UserSettings] UserCreatorID, or the one of --as. It lists its roles and says whether it has every right.

The commands do not check the policies of that account. Whoever can run the console on the server can manage every account, so keep shell access to the people who administer the site. --as decides whose name the audit records.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x