added expired to status selction

This commit is contained in:
Roland Gruber 2017-10-17 17:22:22 +02:00
parent 7e450ebdfa
commit f1fc0c1fba
1 changed files with 10 additions and 2 deletions

View File

@ -624,6 +624,8 @@ class lamUserList extends lamList {
/** virtual attribute name for account status column */ /** virtual attribute name for account status column */
const ATTR_ACCOUNT_STATUS = 'lam_virtual_account_status'; const ATTR_ACCOUNT_STATUS = 'lam_virtual_account_status';
/** filter value for expired accounts */
const FILTER_EXPIRED = 1;
/** filter value for locked accounts */ /** filter value for locked accounts */
const FILTER_LOCKED = 2; const FILTER_LOCKED = 2;
/** filter value for partially locked accounts */ /** filter value for partially locked accounts */
@ -872,7 +874,8 @@ class lamUserList extends lamList {
'' => '', '' => '',
_('Unlocked') => self::FILTER_UNLOCKED, _('Unlocked') => self::FILTER_UNLOCKED,
_('Partially locked') => self::FILTER_SEMILOCKED, _('Partially locked') => self::FILTER_SEMILOCKED,
_('Locked') => self::FILTER_LOCKED _('Locked') => self::FILTER_LOCKED,
_('Expired') => self::FILTER_EXPIRED,
); );
$filterInput = new htmlSelect('filter' . strtolower($attrName), $filterOptions, array($value)); $filterInput = new htmlSelect('filter' . strtolower($attrName), $filterOptions, array($value));
$filterInput->setCSSClasses(array($this->type->getScope() . '-dark')); $filterInput->setCSSClasses(array($this->type->getScope() . '-dark'));
@ -950,8 +953,13 @@ class lamUserList extends lamList {
|| ($sambaAvailable && !$sambaLocked) || ($sambaAvailable && !$sambaLocked)
|| ($ppolicyAvailable && !$ppolicyLocked) || ($ppolicyAvailable && !$ppolicyLocked)
|| ($windowsAvailable && !$windowsLocked); || ($windowsAvailable && !$windowsLocked);
$shadowExpired = shadowAccount::isAccountExpired($this->entries[$i]);
$expired = $shadowExpired;
$status = self::FILTER_UNLOCKED; $status = self::FILTER_UNLOCKED;
if ($hasLocked && $hasUnlocked) { if ($expired) {
$status = self::FILTER_EXPIRED;
}
elseif ($hasLocked && $hasUnlocked) {
$status = self::FILTER_SEMILOCKED; $status = self::FILTER_SEMILOCKED;
} }
elseif (!$hasUnlocked && $hasLocked) { elseif (!$hasUnlocked && $hasLocked) {