Skip to content

Commit

Permalink
Merge pull request DSpace#9148 from wwuck/bugfix/ldap-operational-att…
Browse files Browse the repository at this point in the history
…ributes

Return both user and operational LDAP attributes
  • Loading branch information
tdonohue authored Nov 8, 2023
2 parents a08145e + 56b7cbf commit 2298701
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ protected String getDNOfUser(String adminUser, String adminPassword, Context con
try {
SearchControls ctrls = new SearchControls();
ctrls.setSearchScope(ldap_search_scope_value);
// Fetch both user attributes '*' (eg. uid, cn) and operational attributes '+' (eg. memberOf)
ctrls.setReturningAttributes(new String[] {"*", "+"});

String searchName;
if (useTLS) {
Expand Down Expand Up @@ -700,13 +702,13 @@ public String getName() {
/*
* Add authenticated users to the group defined in dspace.cfg by
* the authentication-ldap.login.groupmap.* key.
*
*
* @param dn
* The string containing distinguished name of the user
*
*
* @param group
* List of strings with LDAP dn of groups
*
*
* @param context
* DSpace context
*/
Expand Down

0 comments on commit 2298701

Please sign in to comment.