Commit b5a2e3bb authored by ligang's avatar ligang
Browse files

add Determine if the login user is the owner of the schedule

parent be230c61
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -514,6 +514,13 @@ public class SchedulerService extends BaseService {
            putMsg(result, Status.SCHEDULE_CRON_NOT_EXISTS, scheduleId);
            return result;
        }

        // Determine if the login user is the owner of the schedule
        if (loginUser.getId() != schedule.getUserId()) {
            putMsg(result, Status.USER_NO_OPERATION_PERM);
            return result;
        }

        // check schedule is already online
        if(schedule.getReleaseState() == ReleaseState.ONLINE){
            putMsg(result, Status.SCHEDULE_CRON_STATE_ONLINE,schedule.getId());