Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent query - Script for Confluence page restrictions

Lara Weber
Contributor
January 2, 2025

Can you tell me what to do:

Maybe you can use also: We need the build-in script Update Page Restrictions for specific spaces (all with page restrictions) (key of the spaces to get how in a loop for all restrictet pages?) to set a mng-group admin group of the space. The data should be written on a page with the infos of the pages with group and users. The page should be created once a month.

I tested

 

import com.atlassian.confluence.rpc.soap.services.SpacesSoapService
import com.atlassian.sal.api.component.ComponentLocator

def addSpacePermission = ComponentLocator.getComponent(SpacesSoapService)
def String[] permissions = ["EDITSPACE"]
def String remoteEntity = "<conflu-ateam-mng>"
def String spaceKey = "<ATLASSIAN>"

addSpacePermission.addPermissionsToSpace(permissions, remoteEntity, spaceKey)
//Add permission to the target space: array of permissions, the user or group to be added, and the target space key {code}
but need the query as written above for more spaces and all mng-groups from the spaces.

 

Is there a way to do it quick?

Can I use the code from you to test again? With maybe the class for all spaces ?

A quick answer would be great.

Its urgent.

Thank you

Kind regards

Lara

1 answer

1 accepted

1 vote
Answer accepted
Lara Weber
Contributor
January 2, 2025

Can you call me for questions: +491701407566

Lara Weber
Contributor
January 2, 2025

can you support me? We need it urgent today until 1 p.m. Call me soon if possible. Kind regards.

Lara Weber
Contributor
January 3, 2025

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events