transfer user property locked
This commit is contained in:
parent
0be76b6c23
commit
88f944afa1
@ -190,6 +190,10 @@ public abstract class AbstractRemote implements IRemote {
|
|||||||
return integ != null;
|
return integ != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean assertNotNull(Boolean bool) {
|
||||||
|
return bool != null;
|
||||||
|
}
|
||||||
|
|
||||||
protected void replaceKey(Map<String, String> whereParams, String shortKey, String regularKey) {
|
protected void replaceKey(Map<String, String> whereParams, String shortKey, String regularKey) {
|
||||||
if (whereParams.containsKey(shortKey)) {
|
if (whereParams.containsKey(shortKey)) {
|
||||||
final String value = whereParams.get(shortKey);
|
final String value = whereParams.get(shortKey);
|
||||||
|
@ -23,6 +23,7 @@ public class UnixUserRemote extends AbstractRemote {
|
|||||||
map.put("pac", user.getPac().getName());
|
map.put("pac", user.getPac().getName());
|
||||||
map.put("shell", user.getShell());
|
map.put("shell", user.getShell());
|
||||||
map.put("homedir", user.getHomedir());
|
map.put("homedir", user.getHomedir());
|
||||||
|
map.put("locked", user.isLocked());
|
||||||
Integer quotaSoft = user.getQuotaSoftlimit();
|
Integer quotaSoft = user.getQuotaSoftlimit();
|
||||||
if (assertNotNull(quotaSoft)) {
|
if (assertNotNull(quotaSoft)) {
|
||||||
map.put("quota_softlimit", quotaSoft.toString());
|
map.put("quota_softlimit", quotaSoft.toString());
|
||||||
@ -72,6 +73,10 @@ public class UnixUserRemote extends AbstractRemote {
|
|||||||
if (assertNotNull(quotaLimit)) {
|
if (assertNotNull(quotaLimit)) {
|
||||||
user.setQuotaHardlimit(Integer.parseInt(quotaLimit));
|
user.setQuotaHardlimit(Integer.parseInt(quotaLimit));
|
||||||
}
|
}
|
||||||
|
Boolean locked = (Boolean) map.get("locked");
|
||||||
|
if (assertNotNull(locked)) {
|
||||||
|
user.setLocked(locked);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user