diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-12-16 00:28:26 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-16 00:28:26 +1300 |
commit | 835853422ce9f1c1fde15a6464c6f0f7eda4fed7 (patch) | |
tree | 049fa09050caec98242a0f642d478a533cee5898 /src/org/traccar/database/PermissionsManager.java | |
parent | f76c78a68f249ddb45a2bbae11dd95dd6db743b6 (diff) | |
parent | ef9148eea8dd404aba5707898f244a4b7bc26feb (diff) | |
download | trackermap-server-835853422ce9f1c1fde15a6464c6f0f7eda4fed7.tar.gz trackermap-server-835853422ce9f1c1fde15a6464c6f0f7eda4fed7.tar.bz2 trackermap-server-835853422ce9f1c1fde15a6464c6f0f7eda4fed7.zip |
Merge pull request #2686 from Abyss777/calendars
Calendars implementation
Diffstat (limited to 'src/org/traccar/database/PermissionsManager.java')
-rw-r--r-- | src/org/traccar/database/PermissionsManager.java | 6 |
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; } |