User command


1Presentation

This command manages users registered in the database.

It is compatible with the Auth controller/plugin, the Auth attribute and the Api plugin.


2Add a user

$ bin/comma User add --email=string [--name=string] [--roles=string] [--services=string]

Parameters:

  • email: (mandatory) User's email address.
  • name: (optional) User name.
  • roles: (optional) String containing comma-separated list of user roles (e.g. 'writer,reviewer').
  • services: (optional) String containing comma-separated list of services the user can access (e.g. 'text,images').

3Delete a user

$ bin/comma User remove [--id=id] [--email=string]

Parameters:

  • id: (optional) Identifier of the user to be removed.
  • email: (optional) Mail address of the user to be removed.

One of the two parameters (id or email) must be supplied. If both parameters are supplied, the id takes precedence.


4List users

This command allows you to list users. If no options are given, all users will be displayed. Depending on the options supplied, the list will be filtered.

$ bin/comma User list [--email=string] [--name=string] [--role=string] [--service=string] [--dateCreationFrom=string] [--dateCreationTo=string] [--dateLastLoginFrom=string] [--dateLastLoginTo=string] [--dateLastAccessFrom=string] [--dateLastAccessTo=string]

Parameters:

  • email: (optional) Mail address prefix.
  • name: (optional) User name prefix.
  • role: (optional) Role users must have.
  • service: (optional) Service to which users must have access.
  • dateCreationFrom: (optional) Minimum user creation date (format YYYY-MM-DD).
  • dateCreationTo: (optional) Maximum user creation date (format YYYY-MM-DD).
  • dateLastLoginFrom: (optional) Minimum date of last user authentication (format YYYY-MM-DD).
  • dateLastLoginTo: (optional) Maximum date of last user authentication (format YYYY-MM-DD).
  • dateLastAccessFrom: (optional) Minimum date of last user access (format YYYY-MM-DD).
  • dateLastAccessTo: (optional) Maximum date of last user access (format YYYY-MM-DD).