im trying to get list of admin for each space. But without success.
This is my inspiration: http://come2niks.com/?p=821
I using sql plugin with
SELECT DISTINCT T2.SPACENAME, T1.PERMUSERNAME, T1.CREATOR FROM confluence.spacepermissions T1 JOIN confluence.Spaces T2 ON T1.SPACEID=T2.SPACEID
| Application | user2 | user1|
| Application | user3 | user2|
| Application | | user3|
| Application | | admin|
user1 created user2
user2 created user3
In Space admin > Advanced i get information "Created By: admin (22. 08. 2008)".
My question is what does mean 3rd line?
If you solved or solving similar task i will appreciated for some tips or advices.
SELECT spacename, wm_concat(DISTINCT(ADMIN)) ADMIN FROM (SELECT T2.spacename, T1.PERMUSERNAME ADMIN FROM confluence.spacepermissions T1 JOIN confluence.Spaces T2 ON T1.SPACEID=T2.SPACEID WHERE T2.spacekey NOT LIKE '~%' UNION ALL SELECT T2.spacename, T1.CREATOR ADMIN FROM confluence.spacepermissions T1 JOIN confluence.Spaces T2 ON T1.SPACEID=T2.SPACEID WHERE T2.spacekey NOT LIKE '~%') GROUP BY SPACENAME ORDER BY SPACENAME
The third line in your results is telling you when the space was created, and by whom.
I think your SQL isn't quite right though, I think it'll be fetching information about individual users who have admin rights and have created a space. That won't capture the current space admins, especially if you use any groups in the permissions.
I'm not that familiar with the database though, I have to admit to writing a few lines of code in a small plugin to list users and groups with admin rights (provided a macro to display them)
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...
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!
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