aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/PermissionsManager.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-01-17 09:36:29 +0500
committerAbyss777 <abyss@fox5.ru>2017-01-17 09:36:29 +0500
commit68abcc05ddd3633167f4e1c45d0ae9cf05dbcc43 (patch)
treed75d39c54b90e6109b0c776f89914f84d7789884 /src/org/traccar/database/PermissionsManager.java
parent8a19ed9994e6bdd531faa3021711fc0e89497ca8 (diff)
downloadtrackermap-server-68abcc05ddd3633167f4e1c45d0ae9cf05dbcc43.tar.gz
trackermap-server-68abcc05ddd3633167f4e1c45d0ae9cf05dbcc43.tar.bz2
trackermap-server-68abcc05ddd3633167f4e1c45d0ae9cf05dbcc43.zip
- rename otherUserId variable
- optimize HashSet creation
Diffstat (limited to 'src/org/traccar/database/PermissionsManager.java')
-rw-r--r--src/org/traccar/database/PermissionsManager.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java
index c49ffb00c..4a5f759a8 100644
--- a/src/org/traccar/database/PermissionsManager.java
+++ b/src/org/traccar/database/PermissionsManager.java
@@ -179,9 +179,9 @@ public class PermissionsManager {
}
}
- public void checkManager(long userId, long otherUserId) throws SecurityException {
+ public void checkManager(long userId, long managedUserId) throws SecurityException {
checkManager(userId);
- if (!userPermissions.get(userId).contains(otherUserId)) {
+ if (!userPermissions.get(userId).contains(managedUserId)) {
throw new SecurityException("User access denied");
}
}
@@ -241,9 +241,9 @@ public class PermissionsManager {
}
}
- public void checkUser(long userId, long otherUserId) throws SecurityException {
- if (userId != otherUserId && !isAdmin(userId)) {
- checkManager(userId, otherUserId);
+ public void checkUser(long userId, long managedUserId) throws SecurityException {
+ if (userId != managedUserId && !isAdmin(userId)) {
+ checkManager(userId, managedUserId);
}
}