I saw this question for Jira, from some years ago, so I don't know if it would be terribly accurate answers, but even changing over the jira specifics to confluence it didn't seem to work
We have recently changed which department was responsible for adding jira users, and there was a change in the AD groups, which meant that people were not being assigned to our inhouse equivalent to confluence-users, nor were they being added manually to confluence-users. We now need to find everyone that is not assigned to confluence-users and assign them to the group.
I see in the Scriptrunner documentation that this is possible, but I haven't been able to find concrete examples of this being done in Confluence. Help/Direction would be appreciate.
Well, here’s SQL below for identifying those folks if you at least want a count...
SQL BELOW HERE
(select user_name from CWD_USER
left join CWD_USER_ATTRIBUTE on CWD_USER.id = CWD_USER_ATTRIBUTE.USER_ID
where CWD_USER.DIRECTORY_ID = ‘AD_DIR_ID’ and ATTRIBUTE_NAME = ‘autoGroupsAdded’)
MINUS
(select user_name from CWD_USER
left JOIN CWD_MEMBERSHIP on CWD_USER.ID = CHILD_USER_ID
left join CWD_USER_ATTRIBUTE on CWD_USER.id = CWD_USER_ATTRIBUTE.USER_ID
where CWD_USER.DIRECTORY_ID = ‘AD_DIR_ID’ and ATTRIBUTE_NAME = ‘autoGroupsAdded’ and PARENT_ID = ‘AD_DIR_ID’)
SQL ABOVE HERE
(crafted on Oracle)
Swap out three occurrences of “AD_DIR_ID” with the actual ID of your AD directory. You could also use SQL to add those groups reasonably, but knowing how much your DBA loves you Kimberly, using ScriptRunner as you’re hoping to do is probably a better idea.
Yeah, I don't get much love from the DBAs, especially when it involves breaking glass, so ScriptRunner is really the way I'd like to take on this challenge. But really, I'm sure half of it is that they have better things to do with their day than run queries for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.