Skip to content

Commit

Permalink
fixed issue with email case sensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
albogdano committed Feb 28, 2020
1 parent 1bc8552 commit ffecf8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Expand Up @@ -806,7 +806,8 @@ public boolean isMod(Profile authUser) {
}

public boolean isRecognizedAsAdmin(User u) {
return u.isAdmin() || ADMINS.contains(u.getIdentifier()) || ADMINS.contains(u.getEmail());
return u.isAdmin() || ADMINS.contains(u.getIdentifier()) ||
ADMINS.stream().filter(s -> s.equalsIgnoreCase(u.getEmail())).findAny().isPresent();
}

public boolean canComment(Profile authUser, HttpServletRequest req) {
Expand Down

0 comments on commit ffecf8f

Please sign in to comment.