mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-04 05:09:48 +08:00
update the resource perm (#1087)
* move updateTaskState into try/catch block in case of exception * fix NPE * using conf.getInt instead of getString * for AbstractZKClient, remove the log, for it will print the same log message in createZNodePath. for AlertDao, correct the spelling. * duplicate * refactor getTaskWorkerGroupId * add friendly log * update hearbeat thread num = 1 * fix the bug when worker execute task using queue. and remove checking Tenant user anymore in TaskScheduleThread * 1. move verifyTaskInstanceIsNull after taskInstance 2. keep verifyTenantIsNull/verifyTaskInstanceIsNull clean and readable * fix the message * delete before check to avoid KeeperException$NoNodeException * fix the message * check processInstance state before delete tenant * check processInstance state before delete worker group * refactor * merge api constants into common constatns * update the resource perm
This commit is contained in:
parent
b94dd37e15
commit
0beaffa088
@ -208,7 +208,7 @@ public class ResourcesService extends BaseService {
|
||||
putMsg(result, Status.RESOURCE_NOT_EXIST);
|
||||
return result;
|
||||
}
|
||||
if (loginUser.getId() != resource.getUserId()) {
|
||||
if (loginUser.getId() != resource.getUserId() || loginUser.getUserType() != UserType.ADMIN_USER) {
|
||||
putMsg(result, Status.USER_NO_OPERATION_PERM);
|
||||
return result;
|
||||
}
|
||||
@ -408,7 +408,7 @@ public class ResourcesService extends BaseService {
|
||||
putMsg(result, Status.RESOURCE_NOT_EXIST);
|
||||
return result;
|
||||
}
|
||||
if (loginUser.getId() != resource.getUserId() && loginUser.getUserType() != UserType.ADMIN_USER) {
|
||||
if (loginUser.getId() != resource.getUserId() || loginUser.getUserType() != UserType.ADMIN_USER) {
|
||||
putMsg(result, Status.USER_NO_OPERATION_PERM);
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user