aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/PermissionsManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database/PermissionsManager.java')
-rw-r--r--src/org/traccar/database/PermissionsManager.java4
1 files 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");
}
}