aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-06-28 17:33:23 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-06-28 17:33:23 +1200
commite7909d26d9b55baef5cf4c2c953111fab2d8e081 (patch)
tree607b1e780ba8c51e112b9605dfdb1e9fadcb3df8 /src/org/traccar/database
parent4ff644839b6f2ae815421d404f2b7cd5ace2c92c (diff)
downloadtraccar-server-e7909d26d9b55baef5cf4c2c953111fab2d8e081.tar.gz
traccar-server-e7909d26d9b55baef5cf4c2c953111fab2d8e081.tar.bz2
traccar-server-e7909d26d9b55baef5cf4c2c953111fab2d8e081.zip
Fix user pemissions issue (fix #3302)
Diffstat (limited to 'src/org/traccar/database')
-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");
}
}