aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/PermissionsManager.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-12-14 17:34:34 +0500
committerAbyss777 <abyss@fox5.ru>2016-12-14 18:02:17 +0500
commitfff8f0c792606daff151624479d9ae9dc54187d5 (patch)
tree97e0ab38de08aba1a7b7adf90283df82d850a3ad /src/org/traccar/database/PermissionsManager.java
parent4557cf912fada1dc249333aa05215b0116b8ebab (diff)
downloadtrackermap-server-fff8f0c792606daff151624479d9ae9dc54187d5.tar.gz
trackermap-server-fff8f0c792606daff151624479d9ae9dc54187d5.tar.bz2
trackermap-server-fff8f0c792606daff151624479d9ae9dc54187d5.zip
Calendars implementation
Diffstat (limited to 'src/org/traccar/database/PermissionsManager.java')
-rw-r--r--src/org/traccar/database/PermissionsManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java
index 078a5f935..6c0610655 100644
--- a/src/org/traccar/database/PermissionsManager.java
+++ b/src/org/traccar/database/PermissionsManager.java
@@ -207,6 +207,12 @@ public class PermissionsManager {
}
}
+ public void checkCalendar(long userId, long calendarId) throws SecurityException {
+ if (!Context.getCalendarManager().checkCalendar(userId, calendarId) && !isAdmin(userId)) {
+ throw new SecurityException("Calendar access denied");
+ }
+ }
+
public Server getServer() {
return server;
}