Hi, I have an extracted csv file of page permissions and I want to remove these and replace with different groups.
CLI runFromList or runFromCSV would seem a potential solution, but reading the documentation I am not sure I can pass more than one value back into the --common action as replacePermission needs --id, --userId and --permissions
Is the only option editing my CSV file to make each line an action?
There were a number of other issues that arose as I tried to script this. I'm using PowerShell ISE (but the same issues occurred with Notepad++ and a CMD window) and I had some form of character encoding issue that I couldn't resolve when using the --action run --file "test.txt" construct. There was a spurious character shown as the first character in the content of the test.txt file no matter what I tried in modifying the --encoding.
In the end I just fed a 1260 line list of commands crafted in excel and TextMate (yes, TM good for regex search and replace) into the CLI and waited for about 5 minutes for it all to complete. A bit of a hack, but it worked!
Yes, using a simple run action can often be a good solution. I suspect your spurious character was a BOM - Byte order mark character that we have run into in another context. It should be handled in this area as well, so, I created an improvement request: ACLI-179 - Support CSV files containing a leading BOM character.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, there is no replacePermission action. I assume you are talking about doing a removePermissions and addPermissions . I would recommend you try using these separately on a single example to get the parameters right. Then if you want to do runFromCsv, you will need to provide columns in your csv to match the parameters needed for the single action.
For example:
--action runFromCsv --file xxx.csv --space mySpace --common "--action addPermissions" With CSV something like: group, permissions confluence-administrators, "VIEWSPACE, EDITSPACE"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.