How to do a massive insert into SPACEPERMISSIONS table in confluence 3.4.5?

Hi All, this maybe an stupid question, but I'm stuck with this.

We have an old installation of confluence 2.7 and we need to migrate some users from this installation to our newest (3.4.5).

The issue is, we a large number of users, and a very large number of them as permissions over several sites, but not in the form:

GROUP > SPACE.

They have permissions directly granted to their users for several spaces.

I was looking at the confluence tables and found that the SPACEPERMISSIONS table takes care of this situation.

When I want to do a massive insert, I found that the column PERMID needs to get his value from somewhere, but I dont know from where, because I dont see any sequence or something like that.

Can anybody help me with this?

Thanks in advance!

1 answer

1 accepted

I don't know about direct database update for this, but the Confluence Command Line Interface does have actions for dealing with adding and removing permissions using standard Confluence remote apis.

Hi Bob!

Yes, I'm using your plugin for several tasks, but for this one I was thinking to direct update the DB. If I don't get the right way to do that, I'm going to use the CLI.

By the way, you did a great job with the plugin, thank you very much!

Hi Bob, I tried to implement your solution, but I'm facing the following error:

Remote error: com.atlassian.confluence.rpc.NotPermittedException: Not permitted to add space permissions

I tried with this line:

./confluence.sh --action addPermissions --space "IT001" --permissions CREATEATTACHMENT --userId "gaston"

So, It's correct to understand that this particular process is not supported by the remote API?

Thanks in advance!

Never mind. My mistake was to try to set permissions based on the space title not the space key.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,799 views 26 10
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you