{"record":{"id":"88980843a2e2d910","repo":"apache/dolphinscheduler","slug":"no-current-operating-permission","errorCode":"NO_CURRENT_OPERATING_PERMISSION","errorMessage":"NO_CURRENT_OPERATING_PERMISSION","messagePattern":"NO_CURRENT_OPERATING_PERMISSION","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/MonitorServiceImpl.java","lineNumber":78,"sourceCode":"     * query database state\n     *\n     * @param loginUser login user\n     * @return data base state\n     */\n    @Override\n    public List<DatabaseMetrics> queryDatabaseState(User loginUser) {\n        return Lists.newArrayList(databaseMonitor.getDatabaseMetrics());\n    }\n\n    @Override\n    public List<Server> listServer(RegistryNodeType nodeType) {\n        return registryClient.getServerList(nodeType);\n    }\n\n    @Override\n    public List<WorkflowExecutorDTO> queryWorkflowExecutors(User loginUser, String masterAddress) {\n        if (!loginUser.getUserType().equals(UserType.ADMIN_USER)) {\n            throw new ServiceException(Status.NO_CURRENT_OPERATING_PERMISSION);\n        }\n\n        WorkflowExecutorQueryResponse response = Clients\n                .withService(IWorkflowExecutorQueryClient.class)\n                .withHost(masterAddress)\n                .queryWorkflowExecutors(new WorkflowExecutorQueryRequest());\n        if (!response.isSuccess()) {\n            throw new ServiceException(response.getMessage());\n        }\n        return response.getWorkflowExecutors();\n    }\n\n    @Override\n    public List<TaskExecutorDTO> queryTaskExecutors(User loginUser, String serverAddress) {\n        if (!loginUser.getUserType().equals(UserType.ADMIN_USER)) {\n            throw new ServiceException(Status.NO_CURRENT_OPERATING_PERMISSION);\n        }\n        TaskExecutorQueryResponse response = Clients","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/MonitorServiceImpl.java#L60-L96","documentation":"Raised in MonitorServiceImpl.queryWorkflowExecutors when the logged-in user is not an ADMIN_USER. Viewing workflow executors on a master server is an admin-only monitoring capability, so non-admin callers are rejected with NO_CURRENT_OPERATING_PERMISSION.","triggerScenarios":"Calling GET /monitor/master/list-workflow-executor (queryWorkflowExecutors) with a login user whose userType is GENERAL_USER rather than ADMIN_USER.","commonSituations":"Non-admin operator or automation token hitting the monitor endpoints; role changed on the account; API integration built assuming admin privileges.","solutions":["Log in as / use a token for an admin user (userType=ADMIN_USER).","If the user should have access, elevate their type in the user management UI (Security > User Management).","Restrict the integration to admin credentials or add a permission check in the client before calling."],"exampleFix":"// before\nList<WorkflowExecutorDTO> list = monitorService.queryWorkflowExecutors(normalUser, masterAddress);\n// after\nif (normalUser.getUserType() == UserType.ADMIN_USER) {\n    List<WorkflowExecutorDTO> list = monitorService.queryWorkflowExecutors(normalUser, masterAddress);\n}","handlingStrategy":"validation","validationCode":"if (loginUser.getUserType() != UserType.ADMIN_USER) {\n    throw new SecurityException(\"admin privileges required\");\n}","typeGuard":"boolean isAdmin(User user) {\n    return user != null && user.getUserType() == UserType.ADMIN_USER;\n}","tryCatchPattern":"try {\n    List<WorkflowExecutorDTO> list = monitorService.queryWorkflowExecutors(loginUser, masterAddress);\n} catch (ServiceException e) {\n    // NO_CURRENT_OPERATING_PERMISSION - require admin\n}","preventionTips":["Use admin credentials for /monitor endpoints.","Check userType client-side before calling admin-only APIs.","Keep automation service accounts as ADMIN_USER only if they need monitor access."],"tags":["dolphinscheduler","authorization","monitor"],"backgroundTag":"permission-denied","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}