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

This widget could not be displayed.

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
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

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...

459 views 6 6
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