You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by bh...@apache.org on 2019/10/16 08:03:38 UTC
[incubator-dlab] branch develop updated: DLAB-1175 - made groups
case insensitive
This is an automated email from the ASF dual-hosted git repository.
bhliva pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/develop by this push:
new b31d792 DLAB-1175 - made groups case insensitive
b31d792 is described below
commit b31d792347f004cc04107500ea6acbbc4972e3e8
Author: bhliva <bo...@epam.com>
AuthorDate: Wed Oct 16 11:03:16 2019 +0300
DLAB-1175 - made groups case insensitive
---
.../src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java
index bbcf6da..a5d4f16 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java
@@ -97,7 +97,7 @@ public class UserRoles {
public static boolean isAdmin(UserInfo userInfo) {
final List<UserRole> roles = UserRoles.getRoles();
- return roles == null || roles.stream().anyMatch(r -> ADMIN_ROLE_NAME.equals(r.getId()) &&
+ return roles == null || roles.stream().anyMatch(r -> ADMIN_ROLE_NAME.equalsIgnoreCase(r.getId()) &&
(userRoles.hasAccessByGroup(userInfo, r, userInfo.getRoles()) || userRoles.hasAccessByUserName(userInfo, r)));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org