Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Use a Conditional Statement When Configuring an LDAP Directory in Crowd?

In Crowd 2.3 or newer, I have a Directory configured using LDAP (Sun Directory Server Enterprise Edition). On the COnfiguration tab, the field first name, last name etc get LDAP attribute like 'givenName' ,'sn', etc.

Is it poossible to use a conditional statement somehow in these field tyo pull in one field and if it is blank use another?

For example :

In our LDAP we have givenName (representing first name) and otherName (representing the shorter variant of a preferred name - i.e. Bob instead of Robert).

Is it possible to use a conditional to specify to use otherName unless it is blank then user givenName?

2 answers

I don't think so.

So this would be accomplished through custom coding or extending existing code in Crowd? There is no way out of the box without having to code something?

Yes, Crowd uses a ContextMapper to map a directory context object to a Crowd domain object (Group or User). These context mappers are really just a simple map, that looks for a given key in the directory context, and if present sets the value of the key on the object.

The keys are the values you enter into the directory configuration screen, so really, you would need to provide some custom behaviour on the context mapper to allow for a conditional lookup to be performed.

So this would be accomplished through custom coding or extending existing code in Crowd? There is no way out of the box without having to code something?

Sorry for the slow reply. Yes, the only option at the moment is to extend the Crowd source, there is no 'out of the box' solution to this issue at present, unless there is a way in your LDAP server to provide this type of functionality (which I don't think there is)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Opsgenie

Investigate deployment-related incidents with Bamboo and Opsgenie together

Back in April of last year one of the major product announcements from Opsgenie was the launch of the Incident investigation view which created a deep connection between Bitbucket and Opsgenie, empow...

105 views 1 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you