Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Gaston Gaston November 28, 2011

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

0 votes
Answer accepted
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 28, 2011

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.

Gaston Gaston November 28, 2011

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!

Gaston Gaston November 30, 2011

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!

Gaston Gaston November 30, 2011

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
TAGS
AUG Leaders

Atlassian Community Events