Last reviewed: January 30, 2026

Manage access control with the CLI

Administrators can define who can update collections and metadata as well as manage the publishing workflow.


Administrators

By default, the user creating a site (via the CPUB CLI) is automatically assigned as the site administrator. The administrator is identified by its email address. The administrator has the ability to assign additional administrators to the site. Administrators have permission to perform specific tasks that only they can do, such as deleting the site, changing the site metadata, or more in the future.

  • By default, the user who creates the site (via the CPUB CLI) is added as a site administrator.
  • To edit the list of administrators, you’ll need to use the CPUB CLI (via terminal) and be an administrator yourself..
  • Administrators are specific to a site, there’s no such thing as an administrator for all sites (adding a user as an administrator will not add her/him as the administrator to all sites, the action needs to be repeated on a per-site basis if needed).

Adding/Removing site administrators

To list and edit the administrators for a site, first, you’ll need to open your terminal and run the following command

cpub site admins list --siteId [YOUR_SITE_ID]

* Note: replace [YOUR_SITE_ID] with the site ID value displayed in the CPUB add-on in the ‘site metadata’ section.
Open the CPUB add-on, select “About this site”, the “Site ID” value will be available to copy/paste.

Use these commands below to manage the administrators for a specific site.

Command

Details

cpub site admins list [options]

List admins for a site

cpub site admins remove [options]

Remove admin for a site

cpub site admins add [options]

Add admin to a site

List admins

cpub site admins list --siteId [YOUR_SITE_ID]

Add an administrator users

cpub site admins add --siteId [YOUR_SITE_ID] --email [test@test.com]

Remove an administrator user

cpub site admins remove --siteId [YOUR_SITE_ID] --email [test@test.com]

Collection visibility and access control

See user guide about collections’ visibility for more information.

Move a collection to private:

cpub site publishing --siteId [YOUR_SITE_ID] --mode private

Move a collection back to workspace:

cpub site publishing --siteId [YOUR_SITE_ID] --mode workspace

Add an authorized user to a private site:

cpub site publishing add-user --siteId [YOUR_SITE_ID] --user [[email protected]]

Remove an authorized user to a private site:

cpub site publishing remove-user --siteId [YOUR_SITE_ID] --user [[email protected]]