Bulk setting page perms using db datasource

Steve Letch August 16, 2021

I'm currently working with the add on devs to try and develop a script that will add a group to all pages using the

addGroupToContentPermission routine.


I've so far set up a db datasource to gather all the page ID's to then pass into the script but I'm getting a rollback error.


Here's my script, I see several people in the reviews for the product talking about managing perms with power scripts, so wondered if anyone had a working one similar to what I'm trying to do


string [] allPages = sql("Confluence Database", "SELECT contentid from content where contenttype = 'PAGE' and content_status = 'current'");
for (string pageId in allPages) {
addGroupToContentPermission("View", pageId, "_confluence-browse-all");


Exception while executing SIL program >>null<<: Transaction rolled back because it has been marked as rollback-only


Any ideas? 

0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events