how do I get the list of local user and groups from Jira and confluence server. I need to get the list of local users and groups apart from LDAP ones
Hi @Padmasree P!
Have a look at the answers to the similar question:
JIRA finding users for a given directory
I've tested the method provided by @Salim Morgan and it worked for our Confluence server, I've been able to distinguish between internal directory users and those from Jira directory:
Here's the macro itself:
## Macro title: Last Login## Macro has a body: N## Body processing: Selected body processing option## Output: Selected output option#### Developed by: Andrew Frayling## Modified by: Michael Seager [Atlassian Support]## Mofified by: Salim Morgan (STCS, Riyadh)## Date created: 11/02/2012## Installed by: <your name>## Macro to display the last login date of users who have access to the current space## @noparams#set($containerManagerClass = $content.class.forName('com.atlassian.spring.container.ContainerManager'))#set($getInstanceMethod = $containerManagerClass.getDeclaredMethod('getInstance',null))#set($containerManager = $getInstanceMethod.invoke(null,null))#set($containerContext = $containerManager.containerContext)#set($loginManager = $containerContext.getComponent('loginManager'))#set($users = $userAccessor.getUsers())<table class="confluenceTable"><tr><th class="confluenceTh">Count</th><th class="confluenceTh">User</th><th class="confluenceTh">Login Name</th><th class="confluenceTh">Last Successful Login</th><th class="confluenceTh">Directory</th></tr>#set($count = 0)#foreach($user in $users)## list the last login date of users who can view the current space#if ($permissionHelper.canView($user, $space))#set($count = $count + 1)<tr><td class="confluenceTd">$count</td><td class="confluenceTd">#usernameLink($user.name)</td><td class="confluenceTd">$user.name</td><td class="confluenceTd">$action.dateFormatter.formatDateTime($loginManager.getLoginInfo($user.name).lastSuccessfulLoginDate)</td><td class="confluenceTd">$user.directoryId</td>#end#end</table>
Many thanks go to @Salim Morgan and @Andrew Frayling or @Andrew Frayling @Andrew Frayling (I'm sorry, I don't know which one of you guys is the actual author)
I understand that this is not a complete answer but I hope it helps you to move in the right direction.
It looks like you're new here. Sign in or register to get started.