From 79b5d08f45e8be4ff7d0072cd91fed39d5afe117 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 27 May 2022 16:46:35 -0700 Subject: Fix null server --- src/main/java/org/traccar/api/security/PermissionsService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/org/traccar/api/security/PermissionsService.java b/src/main/java/org/traccar/api/security/PermissionsService.java index e7955086a..4d5cd88ab 100644 --- a/src/main/java/org/traccar/api/security/PermissionsService.java +++ b/src/main/java/org/traccar/api/security/PermissionsService.java @@ -68,7 +68,7 @@ public class PermissionsService { public void checkReports(long userId) throws StorageException, SecurityException { if (!getUser(userId).getAdministrator() - && (server.getDisableReports() || getUser(userId).getDisableReports())) { + && (getServer().getDisableReports() || getUser(userId).getDisableReports())) { throw new SecurityException("Reports are disabled"); } } -- cgit v1.2.3