aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/api')
-rw-r--r--src/main/java/org/traccar/api/security/PermissionsService.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/api/security/PermissionsService.java b/src/main/java/org/traccar/api/security/PermissionsService.java
index 18a376601..38bf48f30 100644
--- a/src/main/java/org/traccar/api/security/PermissionsService.java
+++ b/src/main/java/org/traccar/api/security/PermissionsService.java
@@ -24,7 +24,7 @@ import org.traccar.model.Group;
import org.traccar.model.GroupedModel;
import org.traccar.model.ManagedUser;
import org.traccar.model.Notification;
-import org.traccar.model.ScheduledModel;
+import org.traccar.model.Schedulable;
import org.traccar.model.Server;
import org.traccar.model.User;
import org.traccar.model.UserRestrictions;
@@ -137,13 +137,13 @@ public class PermissionsService {
}
}
}
- if (object instanceof ScheduledModel) {
- ScheduledModel after = ((ScheduledModel) object);
+ if (object instanceof Schedulable) {
+ Schedulable after = ((Schedulable) object);
if (after.getCalendarId() > 0) {
- ScheduledModel before = null;
+ Schedulable before = null;
if (!addition) {
before = storage.getObject(after.getClass(), new Request(
- new Columns.Include("calendarId"), new Condition.Equals("id", after.getId())));
+ new Columns.Include("calendarId"), new Condition.Equals("id", object.getId())));
}
if (before == null || before.getCalendarId() != after.getCalendarId()) {
checkPermission(Calendar.class, userId, after.getCalendarId());
@@ -156,7 +156,7 @@ public class PermissionsService {
Notification before = null;
if (!addition) {
before = storage.getObject(after.getClass(), new Request(
- new Columns.Include("commandId"), new Condition.Equals("id", after.getId())));
+ new Columns.Include("commandId"), new Condition.Equals("id", object.getId())));
}
if (before == null || before.getCommandId() != after.getCommandId()) {
checkPermission(Command.class, userId, after.getCommandId());