diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/api/security/PermissionsService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/api/security/PermissionsService.java b/src/main/java/org/traccar/api/security/PermissionsService.java index c640f8d74..e7955086a 100644 --- a/src/main/java/org/traccar/api/security/PermissionsService.java +++ b/src/main/java/org/traccar/api/security/PermissionsService.java @@ -126,7 +126,7 @@ public class PermissionsService { public <T extends BaseModel> void checkPermission( Class<T> clazz, long userId, long objectId) throws StorageException, SecurityException { - if (!getUser(userId).getAdministrator()) { + if (!getUser(userId).getAdministrator() && !(clazz.equals(User.class) && userId == objectId)) { var objects = storage.getObjects(clazz, new Request( new Columns.Include("id"), new Condition.Permission(User.class, userId, clazz))); |