From c0ce22f8743d9c02e35ab0c4fa00c7cc7e6d5015 Mon Sep 17 00:00:00 2001 From: qiaozhanwei Date: Mon, 4 Nov 2019 16:53:58 +0800 Subject: [PATCH] owners and administrators can delete schedule (#1155) * add ConnectionFactoryTest and ConnectionFactory read datasource from appliction.yml * .escheduler_env.sh to dolphinscheduler_env.sh * dao yml assembly to conf directory * table name modify * entity title table name modify * logback log name modify * running through the big process * running through the big process error modify * logback log name modify * data_source.properties rename * logback log name modify * install.sh optimization * install.sh optimization * command count modify * command state update * countCommandState sql update * countCommandState sql update * remove application.yml file * master.properties modify * install.sh modify * install.sh modify * api server startup modify * the current user quits and the session is completely emptied. bug fix * remove pom package resources * checkQueueNameExist method update * checkQueueExist * install.sh error output update * signOut error update * ProcessDao is null bug fix * install.sh add mail.user * request url variables replace * process define import bug fix * process define import export bug fix * processdefine import export bug fix * down log suffix format modify * import export process define contains crontab error bug fix * add Flink local mode * ProcessDao is null bug fix * loadAverage display problem bug fix * MasterServer rename Server * rollback .env * rollback .env * MasterServer rename Server * the task is abnormal and task is running bug fix * owners and administrators can delete --- .../dolphinscheduler/api/service/SchedulerService.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/SchedulerService.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/SchedulerService.java index 9f4b737b90..e22885ec4a 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/SchedulerService.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/SchedulerService.java @@ -21,10 +21,7 @@ import org.apache.dolphinscheduler.api.dto.ScheduleParam; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.common.Constants; -import org.apache.dolphinscheduler.common.enums.FailureStrategy; -import org.apache.dolphinscheduler.common.enums.Priority; -import org.apache.dolphinscheduler.common.enums.ReleaseState; -import org.apache.dolphinscheduler.common.enums.WarningType; +import org.apache.dolphinscheduler.common.enums.*; import org.apache.dolphinscheduler.common.model.Server; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.common.utils.JSONUtils; @@ -528,7 +525,8 @@ public class SchedulerService extends BaseService { } // Determine if the login user is the owner of the schedule - if (loginUser.getId() != schedule.getUserId()) { + if (loginUser.getId() != schedule.getUserId() && + loginUser.getUserType() != UserType.ADMIN_USER) { putMsg(result, Status.USER_NO_OPERATION_PERM); return result; }