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.
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.
--action runFromCsv --file xxx.csv --space mySpace --common "--action addPermissions" With CSV something like: group, permissions confluence-administrators, "VIEWSPACE, EDITSPACE"
Hi my Community friends! For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs