diff options
author | Abyss777 <abyss@fox5.ru> | 2017-07-21 13:06:18 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-07-21 13:06:18 +0500 |
commit | 55d91ec7a86777bb0427422c15c2b8a60aa00071 (patch) | |
tree | 55d989c8241b18891aa0b479f8e14533cc35d625 /src/org/traccar/api/resource/CalendarResource.java | |
parent | 4b51fef3521e5b0bf338f631ad99e7affe9a1837 (diff) | |
download | trackermap-server-55d91ec7a86777bb0427422c15c2b8a60aa00071.tar.gz trackermap-server-55d91ec7a86777bb0427422c15c2b8a60aa00071.tar.bz2 trackermap-server-55d91ec7a86777bb0427422c15c2b8a60aa00071.zip |
Implement type constants
Diffstat (limited to 'src/org/traccar/api/resource/CalendarResource.java')
-rw-r--r-- | src/org/traccar/api/resource/CalendarResource.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/api/resource/CalendarResource.java b/src/org/traccar/api/resource/CalendarResource.java index 0666f2fed..d29080ee2 100644 --- a/src/org/traccar/api/resource/CalendarResource.java +++ b/src/org/traccar/api/resource/CalendarResource.java @@ -75,7 +75,7 @@ public class CalendarResource extends BaseResource { @PUT public Response update(Calendar entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); - Context.getPermissionsManager().checkPermission("calendar", getUserId(), entity.getId()); + Context.getPermissionsManager().checkPermission(Context.TYPE_CALENDAR, getUserId(), entity.getId()); Context.getCalendarManager().updateItem(entity); return Response.ok(entity).build(); } @@ -84,7 +84,7 @@ public class CalendarResource extends BaseResource { @DELETE public Response remove(@PathParam("id") long id) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); - Context.getPermissionsManager().checkPermission("calendar", getUserId(), id); + Context.getPermissionsManager().checkPermission(Context.TYPE_CALENDAR, getUserId(), id); Context.getCalendarManager().removeItem(id); return Response.noContent().build(); } |