necouchman commented on a change in pull request #422: GUACAMOLE-300: Support
posixGroup in LDAP Authentication and Group-based Session Admission
URL: https://github.com/apache/guacamole-client/pull/422#discussion_r300887867
##########
File path:
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/group/UserGroupService.java
##########
@@ -165,14 +165,44 @@ private String getGroupSearchFilter() throws
GuacamoleException {
if (groupBaseDN == null)
return Collections.emptyList();
+ // memberAttribute specified in properties could contain DN or
username
+ String memberAttributeType = confService.getMemberAttributeType();
+ String userID = userDN;
+ switch (memberAttributeType) {
Review comment:
Looks much better with the `enum`, here, but, now I think we can probably
get rid of the `switch()` statement, no? Based on the way the logic is
constructed, here, I think you can just do the `String userID = userDN;`
assignment, and then do a `if (memberAttributeType == MemberAttributeType.UID)`
with and re-assign as necessary?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services