Automating with Management Commands¶
If you’re automating installs of Review Board and Power Pack, you may still need to set up a license file and configure licensed users and settings. In Power Pack 1.4+, you can automate this with our new command-line management commands.
The config-powerpack-license command is used to associate an existing license file with Power Pack and control auto-adding of users to the license.
Installing a license¶
If Power Pack is unlicensed, or you need to replace the license, you can
rb-site manage /path/to/site config-powerpack-license -- \ --license=powerpack.lic
Configuring auto-adding of users¶
You can enable Automatic User Licensing on the command line using the
To disable auto-adding, run:
rb-site manage /path/to/site config-powerpack-license -- \ --auto-add-mode=disabled
To enable auto-adding of all new users who register on Review Board:
rb-site manage /path/to/site config-powerpack-license -- \ --auto-add-mode=all-new
To enable auto-adding of all users who join one or more particular groups:
rb-site manage /path/to/site config-powerpack-license -- \ --auto-add-mode=groups --auto-add-groups=group1,group2,group3
You can also replace the list of groups at any time:
rb-site manage /path/to/site config-powerpack-license -- \ --auto-add-mode=groups --auto-add-groups=new-group1,new-group2
The license-powerpack-users command takes one or more usernames and adds them to the current license, if one is set and if Power Pack is enabled. For example:
rb-site manage /path/to/site license-powerpack-users joe bob anne
This will display the number of users added to the license, and show errors for any users who could not be added (due to already being present or if the license cap has been hit).
The unlicense-powerpack-users command is used to unlicense users who have been previously licensed. It works just like license-powerpack-users:
rb-site manage /path/to/site unlicense-powerpack-users bob carla