You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by GitBox <gi...@apache.org> on 2022/04/02 03:47:38 UTC
[GitHub] [incubator-linkis] peacewong commented on a change in pull request #1869: add admin auth check for api /configuration/createSecondCategory and /microservice/allInstance
peacewong commented on a change in pull request #1869:
URL: https://github.com/apache/incubator-linkis/pull/1869#discussion_r841002917
##########
File path: linkis-public-enhancements/linkis-publicservice/linkis-instance-label/linkis-instance-label-server/src/main/java/org/apache/linkis/instance/label/restful/InstanceRestful.java
##########
@@ -126,4 +136,9 @@ public Message getEurekaURL(HttpServletRequest request) throws Exception {
String eurekaURL = insLabelService.getEurekaURL();
return Message.ok().data("url", eurekaURL);
}
+
+ private Boolean isAdmin(String userName) {
+ String[] admins = InstanceConfigration.GOVERNANCE_STATION_ADMIN().getValue().split(",");
Review comment:
It is recommended to optimize direct calls: Configuration.isAdmin
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org