Script Runner -- checking if user is in crowd directory that uses ldap.

Hi,

Our Jira instance is integrated with an external crowd. The crowd instance has several directories -- one of them uses the Microsoft Active Directory connector.

Just to be clear -- our Jira connects to crowd via a single user directory.

Is there away in script runner to check if a username is one that uses the ldap connector in crowd from with Jira -- wasn't sure if the embedded crowd api could do that?

Tips appreciated.

2 answers

1 accepted

This widget could not be displayed.

It sounds like you're trying to determine which directory in Crowd a user came from, from the perspective of an application connected to Crowd. If so, that will be difficult to impossible, as Crowd has "abstract away directory aggregation from applications" as one of its design goals.

Certainly if you were to work out a way of doing this, it's extremely likely that we won't ensure backwards compatibility with it (in fact, it's more likely to be treated as a bug).

yep - exactly. Thanks for the info/insight!

This widget could not be displayed.
Henning Tietgens Community Champion Feb 11, 2014

I think you can use these methods from package com.atlassian.crowd.embedded.api:

  • User.getDirectoryId()
  • CrowdDirectoryService.findDirectoryById()
  • Directory.getType()

to get an enum DirectoryType for a user. I don't know if this is enough to distinguish the directories. Maybe even the directory id is enough if it's a local script.

Thanks Henning -- I'll look into those.

I do know that

  • User.getDirectoryId() will only give the directory id of the crowd connection in Jira. For example, I get a directory id of '2' -- which corresponds to crowd. But if I look at crowd, I see several ids for the individual directories.
Henning Tietgens Community Champion Feb 11, 2014

Ah... multiple directories in Crowd. Ok. I can't say anything for this situation, I think the data is only for the JIRA directories. Next time I try to read with more attention. Sorry.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

181 views 2 0
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you