You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/06/01 02:28:49 UTC

[GitHub] [dolphinscheduler] caishunfeng commented on a diff in pull request #10313: [Fix] Privilege Reconstruction Data Query Fix & Resource Creation Post Oper…

caishunfeng commented on code in PR #10313:
URL: https://github.com/apache/dolphinscheduler/pull/10313#discussion_r886267419


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/BaseServiceImpl.java:
##########
@@ -47,6 +48,15 @@ public class BaseServiceImpl implements BaseService {
     @Autowired
     protected ResourcePermissionCheckService resourcePermissionCheckService;
 
+    @Override
+    public void permissionPostHandle(AuthorizationType authorizationType, Integer userId, List<Integer> ids, Logger logger) {
+        try{
+            resourcePermissionCheckService.postHandle(authorizationType, userId, ids, logger);
+        }catch (Exception e){
+            logger.error("post handle error", e);

Review Comment:
   Is it better to throw a permission exception here?



##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/permission/ResourcePermissionCheckService.java:
##########
@@ -58,4 +58,12 @@
      * @return
      */
     boolean functionDisabled();
+
+    /**
+     * postHandle

Review Comment:
   add some doc



##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/permission/ResourcePermissionCheckServiceImpl.java:
##########
@@ -88,6 +88,11 @@ public boolean functionDisabled() {
         return false;
     }
 
+    @Override
+    public void postHandle(AuthorizationType authorizationType, Integer userId, List<Integer> ids, Logger logger) {
+        logger.info("no post handle");

Review Comment:
   ```suggestion
           logger.debug("no post handle");
   ```



-- 
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@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org