Versions Compared

Key

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

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

Instructions

Use the addPermissions action to add space permission to a group by providing the space details in a CSV file. Shown below are the parameters used:

  • permissions: Contains the type of permission.
  • group: Contains the group name.

specific group. 

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

    Code Block
    themeMidnight
    --action runFromCsv --file "space.csv" --common "--action addPermissions --permissions "viewspace" --group "supportgroup"" --continue


    Once the above command is executed,  View permission is added to the spaces that were provided in the CSV file.
    Image Removed
  3. Ensure the parameter group is updated appropriately with the group name.

...

  1. space(s) for the specified group, as shown below.

    Image Added

The above cli command has the following parameters:

  • permissions:: value specify the type of permission. 
  • group: value specify the group name.
  • common: Common parameter string added to all run actions.
  • continue: Continue processing even after errors are encountered for run actions. 


Info
  • Valid space permissions 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.