Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains how to add the view space permissions permission in bulk to a specific group using Confluence Command Line Interface (CLI).

Instructions

Use the addPermissions action and to add space permission to a group by providing the space details in a CSV filespecific group for multiple spaces

  1. Create a CSV file named space.csv with the list of users space keys as required with column name as space.
  2. Execute the following CLI command to add the VIEW permission for all the spaces mentioned in the CSV file for a group to spaces that are in space.csv file.specific group:

    Code Block
    themeMidnight
    --action runFromCsv --file "space.csv" --common "--action addPermissions --permissions "viewspace" --group "supportgroup"" --continue
    Once the above command is executed, 


You can verify that the View permission is now added to

...

the specified space(s) for the specified group in the Permissions page. The result of the command given in this example is as shown:

Image Added

The given CLI command has the following parameters:

  • permissions: value specifies the type of permission. 
  • group: value specifies the group name.
  • common: is a common parameter string added to all run actions.
  • continue: is used to continue processing even after errors are encountered for run actions.
Info
  • Valid values for the permissions parameter are:
    • viewspace
    • editspace
    • setpagepermissions
    • removepage
    • editblog
    • removeblog
    • comment
    • removecomment
    • createattachment
    • removeattachment
    • exportspace
  • The CLI action is to be tested in a non-production environment before implementing it in the production environment.