Skip to content

Instantly share code, notes, and snippets.

@dodok1
Created January 24, 2013 09:30
Show Gist options
  • Save dodok1/4619132 to your computer and use it in GitHub Desktop.
Save dodok1/4619132 to your computer and use it in GitHub Desktop.
Getting LDAP parameters in JIRA is easy
import com.atlassian.jira.component.ComponentAccessor
def cds = ComponentAccessor.getComponent(com.atlassian.crowd.embedded.api.CrowdDirectoryService)
def attrs = cds.findAllDirectories().find{it.isActive() && it.attributes.keySet().contains('ldap.url')}?.attributes
if (attrs) attrs.collect{k,v->"$k = $v"}.join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment