I’m trying to find a way to generate a list that will show which spaces contain permissions for a specific user group. I DO NOT want this script to delete or modify any permissions, I just want the list. I looked on the forums and found a few related articles, but nothing seems to be working for me.
This script from the Adaptavist library seems like a good starting point, but I’m a newbie with scripts so I don’t know what needs to be modified to generate a list rather than remove space permissions. Also, I do not know what fields should be updated in the template to run the script (the group I’m looking into is called: WikiAnnouncers)
To generate a list of group permissions for all spaces in Confluence using ScriptRunner, you can use the following script. This script will iterate through all spaces and list the permissions assigned to each group:
@fcerullo thanks for the response. When I try to run the script I get the following error:
The script could not be compiled <pre>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script7.groovy: 7: Unexpected character: '→' @ line 7, column 21. spaces.each { space → ^ 1 error </pre>.
I’ve tried manipulating your script, but nothing I do seems to work.
I tried running the script with those changes, but I’m still getting the an error:
The script could not be compiled: <pre>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script5.groovy: 7: Unexpected input: '{' @ line 7, column 13. spaces.each { space -> ^ 1 error </pre>.
This version should avoid the syntax issue and compile successfully. If you continue to encounter errors, double-check the syntax and ensure that your environment supports Groovy scripting.