diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-18 11:55:35 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-18 11:55:35 -0700 |
commit | 895e89504ff0ef6fe05e2a74847f9aa582a9d270 (patch) | |
tree | 046fb5b147f53aaaed4a5f6a569cb85a361c2c37 /src/main/java/org/traccar/database/PermissionsManager.java | |
parent | 03b50c61afd7c9d7e19a76feb261147dd0f69588 (diff) | |
download | trackermap-server-895e89504ff0ef6fe05e2a74847f9aa582a9d270.tar.gz trackermap-server-895e89504ff0ef6fe05e2a74847f9aa582a9d270.tar.bz2 trackermap-server-895e89504ff0ef6fe05e2a74847f9aa582a9d270.zip |
Remove unused code
Diffstat (limited to 'src/main/java/org/traccar/database/PermissionsManager.java')
-rw-r--r-- | src/main/java/org/traccar/database/PermissionsManager.java | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/main/java/org/traccar/database/PermissionsManager.java b/src/main/java/org/traccar/database/PermissionsManager.java index 9d1e5aadf..0ff20775a 100644 --- a/src/main/java/org/traccar/database/PermissionsManager.java +++ b/src/main/java/org/traccar/database/PermissionsManager.java @@ -40,7 +40,6 @@ public class PermissionsManager { private static final Logger LOGGER = LoggerFactory.getLogger(PermissionsManager.class); private final DataManager dataManager; - private final Storage storage; private final ReadWriteLock lock = new ReentrantReadWriteLock(); @@ -49,9 +48,8 @@ public class PermissionsManager { private final Map<Long, Set<Long>> deviceUsers = new HashMap<>(); private final Map<Long, Set<Long>> groupDevices = new HashMap<>(); - public PermissionsManager(DataManager dataManager, Storage storage) { + public PermissionsManager(DataManager dataManager) { this.dataManager = dataManager; - this.storage = storage; refreshDeviceAndGroupPermissions(); } @@ -71,15 +69,6 @@ public class PermissionsManager { lock.writeLock().unlock(); } - public User getUser(long userId) { - try { - return storage.getObject(User.class, new Request( - new Columns.All(), new Condition.Equals("id", "id", userId))); - } catch (StorageException e) { - throw new RuntimeException(e); - } - } - public Set<Long> getGroupPermissions(long userId) { readLock(); try { @@ -174,11 +163,6 @@ public class PermissionsManager { } } - public boolean getUserAdmin(long userId) { - User user = getUser(userId); - return user != null && user.getAdministrator(); - } - public void refreshPermissions(Permission permission) { if (permission.getOwnerClass().equals(User.class)) { if (permission.getPropertyClass().equals(Device.class) |