Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
syapollo committed Aug 25, 2020
1 parent 136b456 commit f2682e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,18 @@ public String parseName(Object request) {
String namespaceId = req.getParameter("tenant");
String groupName = req.getParameter("group");
String dataId = req.getParameter("dataId");

StringBuilder sb = new StringBuilder();

if (StringUtils.isNotBlank(namespaceId)) {
sb.append(namespaceId);
}

sb.append(Resource.SPLITTER);

if (StringUtils.isBlank(dataId)) {
sb.append("*").append(Resource.SPLITTER).append(AUTH_CONFIG_PREFIX).append("*");
} else {
sb.append(groupName).append(Resource.SPLITTER).append(AUTH_CONFIG_PREFIX).append(dataId);
if (StringUtils.isNotBlank(groupName)) {
sb.append(groupName);
}
sb.append(Resource.SPLITTER).append(AUTH_CONFIG_PREFIX);
if (StringUtils.isNotBlank(dataId)) {
sb.append(dataId);
}

return sb.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ public String parseName(Object request) {

sb.append(Resource.SPLITTER);

if (StringUtils.isBlank(serviceName)) {
sb.append("*").append(Resource.SPLITTER).append(AUTH_NAMING_PREFIX).append("*");
} else {
sb.append(groupName).append(Resource.SPLITTER).append(AUTH_NAMING_PREFIX).append(serviceName);
if (StringUtils.isNotBlank(groupName)) {
sb.append(groupName);
}
sb.append(Resource.SPLITTER).append(AUTH_NAMING_PREFIX);
if (StringUtils.isNotBlank(serviceName)) {
sb.append(serviceName);
}

return sb.toString();
Expand Down

0 comments on commit f2682e1

Please sign in to comment.