diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-19 10:23:24 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-19 10:23:24 +1300 |
commit | b0aa4698e95658f57ec2d3e0ed4f3fe0db8500a2 (patch) | |
tree | 3b8b691bb01298ba6207d18ce761bd9ee6537971 /src/org/traccar/api/resource/UserResource.java | |
parent | 3eca9acd6e6a160df8f7b86150429c3d7c09b0c3 (diff) | |
parent | e21cc32bb74d998246b52faaf49b6ea742e4d6e3 (diff) | |
download | traccar-server-b0aa4698e95658f57ec2d3e0ed4f3fe0db8500a2.tar.gz traccar-server-b0aa4698e95658f57ec2d3e0ed4f3fe0db8500a2.tar.bz2 traccar-server-b0aa4698e95658f57ec2d3e0ed4f3fe0db8500a2.zip |
Merge pull request #2552 from Abyss777/token2
Implement users tokens
Diffstat (limited to 'src/org/traccar/api/resource/UserResource.java')
-rw-r--r-- | src/org/traccar/api/resource/UserResource.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/api/resource/UserResource.java b/src/org/traccar/api/resource/UserResource.java index c6e84c918..2ff1639f6 100644 --- a/src/org/traccar/api/resource/UserResource.java +++ b/src/org/traccar/api/resource/UserResource.java @@ -66,7 +66,9 @@ public class UserResource extends BaseResource { || old.getAdmin() != entity.getAdmin() || old.getReadonly() != entity.getReadonly() || old.getDisabled() != entity.getDisabled() - || old.getDeviceLimit() != entity.getDeviceLimit()) { + || old.getDeviceLimit() != entity.getDeviceLimit() + || old.getToken() == null && entity.getToken() != null + || old.getToken() != null && !old.getToken().equals(entity.getToken())) { Context.getPermissionsManager().checkAdmin(getUserId()); } else { Context.getPermissionsManager().checkUser(getUserId(), entity.getId()); |