haydenzhourepo commented on a change in pull request #5422:
URL: https://github.com/apache/dolphinscheduler/pull/5422#discussion_r627294967



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java
##########
@@ -74,20 +72,18 @@
     @PostMapping(value = "/create")
     @ResponseStatus(HttpStatus.CREATED)
     @ApiException(CREATE_ACCESS_TOKEN_ERROR)
-    @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
-    public Result createToken(@ApiIgnore @RequestAttribute(value = 
Constants.SESSION_USER) User loginUser,
-                              @RequestParam(value = "userId") int userId,
+    @AccessLogAnnotation()
+    public Result createToken(@RequestParam(value = "userId") int userId,
                               @RequestParam(value = "expireTime") String 
expireTime,
                               @RequestParam(value = "token") String token) {
 
-        Map<String, Object> result = accessTokenService.createToken(loginUser, 
userId, expireTime, token);
+        Map<String, Object> result = 
accessTokenService.createToken(AuthUtil.user(), userId, expireTime, token);

Review comment:
       and this change will impact all test cases of service.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to