Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/maven/fixes/8.3' into maven/rele…
Browse files Browse the repository at this point in the history
…ase/8.3
  • Loading branch information
metaventis-build committed Sep 24, 2024
2 parents 472bed0 + d1d8751 commit 3cd411f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,11 @@ public Void doWork() throws Exception {
public HashMap<String,String> validateAuthentication(HttpSession session){
HashMap<String,String> result = null;
String currentTicket = (String)session.getAttribute(CCConstants.AUTH_TICKET);
log.debug("Session id: " + session.getId()+ ", ticket from session: " + currentTicket);
if(currentTicket != null){
try{
authenticationService.validate(currentTicket);
log.debug("Logged in as user: " + authenticationService.getCurrentUserName() + " with ticket " + authenticationService.getCurrentTicket());
result = new HashMap<>();
result.put(CCConstants.AUTH_USERNAME, authenticationService.getCurrentUserName());
result.put(CCConstants.AUTH_TICKET, currentTicket);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ public SearchResult<String> findAuthorities(AuthorityType type,String searchWord

}

String finalQuery;
String finalQuery = "";
if(type==null) {
finalQuery="";
if(findUsersQuery!=null)
Expand All @@ -931,6 +931,11 @@ public SearchResult<String> findAuthorities(AuthorityType type,String searchWord
if(findUsersQuery != null){
finalQuery += " OR ";
}
if(customProperties!=null){
for(Map.Entry<String, String> entry : customProperties.entrySet()){
findGroupsQuery.append(" AND @"+entry.getKey().replace(":", "\\:")+":\""+QueryParser.escape(entry.getValue())+"\"");
}
}
finalQuery += "(" + findGroupsQuery + ")";
}
}
Expand All @@ -941,18 +946,13 @@ else if(type.equals(AuthorityType.GROUP)) {
if(findGroupsQuery==null)
finalQuery="";
else
finalQuery=findGroupsQuery.toString();
finalQuery = findGroupsQuery.toString();
}
else {
throw new IllegalArgumentException("Unsupported authority type "+type);
}
if(finalQuery.isEmpty())
return new SearchResult<String>();
if(customProperties!=null){
for(Map.Entry<String, String> entry : customProperties.entrySet()){
finalQuery+=(" AND @"+entry.getKey().replace(":", "\\:")+":\""+QueryParser.escape(entry.getValue())+"\"");
}
}

logger.debug("finalQuery:" + finalQuery);

Expand Down

0 comments on commit 3cd411f

Please sign in to comment.