HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2015-12-23 88f944afa18ac9fb53c8dce0b79944acca60d20a
transfer user property locked
2 files modified
9 ■■■■■ changed files
hsarback/src/de/hsadmin/remote/AbstractRemote.java 4 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/remote/UnixUserRemote.java 5 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/remote/AbstractRemote.java
@@ -190,6 +190,10 @@
        return integ != null;
    }
    protected boolean assertNotNull(Boolean bool) {
        return bool != null;
    }
    protected void replaceKey(Map<String, String> whereParams, String shortKey, String regularKey) {
        if (whereParams.containsKey(shortKey)) {
            final String value = whereParams.get(shortKey);
hsarback/src/de/hsadmin/remote/UnixUserRemote.java
@@ -23,6 +23,7 @@
        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 @@
        if (assertNotNull(quotaLimit)) {
            user.setQuotaHardlimit(Integer.parseInt(quotaLimit));
        }
        Boolean locked = (Boolean) map.get("locked");
        if (assertNotNull(locked)) {
            user.setLocked(locked);
        }
    }
    @Override