You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by of...@apache.org on 2020/04/02 12:39:38 UTC
[incubator-dlab] branch DLAB-1571 updated: [DLAB-1686] Fixed issue
with key sensitive of group
This is an automated email from the ASF dual-hosted git repository.
ofuks pushed a commit to branch DLAB-1571
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1571 by this push:
new e996afc [DLAB-1686] Fixed issue with key sensitive of group
e996afc is described below
commit e996afce8d93c25a99ee6ab642e10ba7d314d975
Author: Oleh Fuks <ol...@gmail.com>
AuthorDate: Thu Apr 2 15:39:19 2020 +0300
[DLAB-1686] Fixed issue with key sensitive of group
---
.../src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java | 8 ++++++--
.../com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java | 4 ++--
2 files changed, 8 insertions(+), 4 deletions(-)
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 621f2dd..9be9578 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
@@ -314,8 +314,12 @@ public class UserRoles {
}
private static Set<String> retainGroups(Set<String> groups1, Set<String> groups2) {
- HashSet<String> result = new HashSet<>(groups1);
- result.retainAll(groups2);
+ Set<String> result = groups2
+ .stream()
+ .map(String::toLowerCase)
+ .collect(Collectors.toSet());
+ result.retainAll(groups1);
+
return result;
}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
index 0d77367..176f22b 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
@@ -209,8 +209,8 @@ public class BillingServiceImpl implements BillingService {
new GenericType<List<BillingData>>() {
}, Collections.singletonMap("dlabIds", String.join(",", dlabIds)));
} catch (Exception e) {
- log.error("Cannot retrieve billing information for {} {}", dlabIds, e.getMessage(), e);
- throw new DlabException("Cannot retrieve billing information ", e);
+ log.error("Cannot retrieve billing information for {} {}", dlabIds, e.getMessage());
+ return Collections.emptyList();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org