diff --git a/hsarback/src/de/hsadmin/remote/AbstractRemote.java b/hsarback/src/de/hsadmin/remote/AbstractRemote.java index 1f7bf91..5548459 100644 --- a/hsarback/src/de/hsadmin/remote/AbstractRemote.java +++ b/hsarback/src/de/hsadmin/remote/AbstractRemote.java @@ -190,6 +190,10 @@ public abstract class AbstractRemote implements IRemote { return integ != null; } + protected boolean assertNotNull(Boolean bool) { + return bool != null; + } + protected void replaceKey(Map whereParams, String shortKey, String regularKey) { if (whereParams.containsKey(shortKey)) { final String value = whereParams.get(shortKey); diff --git a/hsarback/src/de/hsadmin/remote/UnixUserRemote.java b/hsarback/src/de/hsadmin/remote/UnixUserRemote.java index d30bdeb..82f6362 100644 --- a/hsarback/src/de/hsadmin/remote/UnixUserRemote.java +++ b/hsarback/src/de/hsadmin/remote/UnixUserRemote.java @@ -23,6 +23,7 @@ public class UnixUserRemote extends AbstractRemote { map.put("pac", user.getPac().getName()); map.put("shell", user.getShell()); map.put("homedir", user.getHomedir()); + map.put("locked", user.isLocked()); Integer quotaSoft = user.getQuotaSoftlimit(); if (assertNotNull(quotaSoft)) { map.put("quota_softlimit", quotaSoft.toString()); @@ -72,6 +73,10 @@ public class UnixUserRemote extends AbstractRemote { if (assertNotNull(quotaLimit)) { user.setQuotaHardlimit(Integer.parseInt(quotaLimit)); } + Boolean locked = (Boolean) map.get("locked"); + if (assertNotNull(locked)) { + user.setLocked(locked); + } } @Override