mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
WebAdmin: add expired to the status in users page
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -267,15 +267,23 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
||||
{
|
||||
data: "status",
|
||||
render: function(data, type, row) {
|
||||
let result = data;
|
||||
if (row.expiration_date){
|
||||
if (row.expiration_date < Date.now()){
|
||||
result = -1;
|
||||
}
|
||||
}
|
||||
if (type === 'display') {
|
||||
switch (data){
|
||||
switch (result){
|
||||
case 1:
|
||||
return $.t('general.active');
|
||||
case -1:
|
||||
return $.t('general.expired');
|
||||
default:
|
||||
return $.t('general.inactive');
|
||||
}
|
||||
}
|
||||
return data;
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user