From e7909d26d9b55baef5cf4c2c953111fab2d8e081 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 28 Jun 2017 17:33:23 +1200 Subject: Fix user pemissions issue (fix #3302) --- src/org/traccar/database/PermissionsManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java index 11f147c7c..9a82efd48 100644 --- a/src/org/traccar/database/PermissionsManager.java +++ b/src/org/traccar/database/PermissionsManager.java @@ -182,14 +182,14 @@ public class PermissionsManager { public void checkManager(long userId, long managedUserId) throws SecurityException { checkManager(userId); - if (!userPermissions.get(userId).contains(managedUserId)) { + if (!getUserPermissions(userId).contains(managedUserId)) { throw new SecurityException("User access denied"); } } public void checkUserLimit(long userId) throws SecurityException { int userLimit = users.get(userId).getUserLimit(); - if (userLimit != -1 && userPermissions.get(userId).size() >= userLimit) { + if (userLimit != -1 && getUserPermissions(userId).size() >= userLimit) { throw new SecurityException("Manager user limit reached"); } } -- cgit v1.2.3