aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-11-28 18:09:59 +1300
committerGitHub <noreply@github.com>2017-11-28 18:09:59 +1300
commit97360131f2f5f53c79e4d41a3e5b3bfebe49d960 (patch)
treef888e333462c560c973bd181b03fc7e6c89f7e54
parent371edced45683da9a3b7195d48787b9f7a40b232 (diff)
parent9cc7ba4e9a1dfceba1b88e32a35915f513b3a688 (diff)
downloadtrackermap-server-97360131f2f5f53c79e4d41a3e5b3bfebe49d960.tar.gz
trackermap-server-97360131f2f5f53c79e4d41a3e5b3bfebe49d960.tar.bz2
trackermap-server-97360131f2f5f53c79e4d41a3e5b3bfebe49d960.zip
Merge pull request #3658 from Abyss777/local_login_limit_commad
- Fix local login if ldap enabled & Limit Command permission
-rw-r--r--src/org/traccar/database/DataManager.java2
-rw-r--r--src/org/traccar/database/PermissionsManager.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index abc424ff9..f813426d3 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -307,7 +307,7 @@ public class DataManager {
.executeQuerySingle(User.class);
LdapProvider ldapProvider = Context.getLdapProvider();
if (user != null) {
- if (ldapProvider != null && ldapProvider.login(user.getLogin(), password)
+ if (ldapProvider != null && user.getLogin() != null && ldapProvider.login(user.getLogin(), password)
|| !forceLdap && user.isPasswordValid(password)) {
return user;
}
diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java
index 07b60ba58..0e9097d25 100644
--- a/src/org/traccar/database/PermissionsManager.java
+++ b/src/org/traccar/database/PermissionsManager.java
@@ -255,7 +255,8 @@ public class PermissionsManager {
}
if (before.getReadonly() != after.getReadonly()
|| before.getDeviceReadonly() != after.getDeviceReadonly()
- || before.getDisabled() != after.getDisabled()) {
+ || before.getDisabled() != after.getDisabled()
+ || before.getLimitCommands() != after.getLimitCommands()) {
if (userId == after.getId()) {
checkAdmin(userId);
}