diff options
author | Anton Tananaev <atananaev@lyft.com> | 2020-12-29 11:11:13 -0800 |
---|---|---|
committer | Anton Tananaev <atananaev@lyft.com> | 2020-12-29 11:11:13 -0800 |
commit | 47468774b6b87c67d8ba98e52bfece04d6d48d1a (patch) | |
tree | 3ed320c9858244b56cab25cdfd35c5aea06e3e0c /src/main/java/org/traccar/api | |
parent | d6862a9259a0f922120740896f30df631e03eb3e (diff) | |
download | traccar-server-47468774b6b87c67d8ba98e52bfece04d6d48d1a.tar.gz traccar-server-47468774b6b87c67d8ba98e52bfece04d6d48d1a.tar.bz2 traccar-server-47468774b6b87c67d8ba98e52bfece04d6d48d1a.zip |
Migrate LDAP configuration
Diffstat (limited to 'src/main/java/org/traccar/api')
-rw-r--r-- | src/main/java/org/traccar/api/resource/UserResource.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/api/resource/UserResource.java b/src/main/java/org/traccar/api/resource/UserResource.java index 813ace6d6..d54cc2382 100644 --- a/src/main/java/org/traccar/api/resource/UserResource.java +++ b/src/main/java/org/traccar/api/resource/UserResource.java @@ -17,6 +17,7 @@ package org.traccar.api.resource; import org.traccar.Context; import org.traccar.api.BaseObjectResource; +import org.traccar.config.Keys; import org.traccar.database.UsersManager; import org.traccar.helper.LogAction; import org.traccar.model.ManagedUser; @@ -73,8 +74,8 @@ public class UserResource extends BaseObjectResource<User> { Context.getPermissionsManager().checkUserLimit(getUserId()); } else { Context.getPermissionsManager().checkRegistration(getUserId()); - entity.setDeviceLimit(Context.getConfig().getInteger("users.defaultDeviceLimit", -1)); - int expirationDays = Context.getConfig().getInteger("users.defaultExpirationDays"); + entity.setDeviceLimit(Context.getConfig().getInteger(Keys.USERS_DEFAULT_DEVICE_LIMIT)); + int expirationDays = Context.getConfig().getInteger(Keys.USERS_DEFAULT_EXPIRATION_DAYS); if (expirationDays > 0) { entity.setExpirationTime( new Date(System.currentTimeMillis() + (long) expirationDays * 24 * 3600 * 1000)); |