Ensure that the user should be able to specify an older date for the account expiration of the role/user. Fixes #6120

This commit is contained in:
Nikhil Mohite 2021-01-15 11:38:08 +05:30 committed by Akshay Joshi
parent f86f58dc56
commit a2edf317a9
3 changed files with 16 additions and 4 deletions

View File

@ -37,6 +37,7 @@ Bug fixes
| `Issue #6077 <https://redmine.postgresql.org/issues/6077>`_ - Fixed accessibility issues in various dialogs.
| `Issue #6084 <https://redmine.postgresql.org/issues/6084>`_ - Fixed TypeError exception in schema diff when selected any identical object.
| `Issue #6096 <https://redmine.postgresql.org/issues/6096>`_ - Updated deployment documentation, refer correctly to uWSGI where Gunicorn had been referenced.
| `Issue #6120 <https://redmine.postgresql.org/issues/6120>`_ - Ensure that the user should be able to specify an older date for the account expiration of the role/user.
| `Issue #6121 <https://redmine.postgresql.org/issues/6121>`_ - Fixed an issue where the database list in the new connection window is not visible.
| `Issue #6128 <https://redmine.postgresql.org/issues/6128>`_ - Fixed an issue where sequences are not created.
| `Issue #6140 <https://redmine.postgresql.org/issues/6140>`_ - Ensure that verbose logs should be visible for Utility(Backup, Maintenance) jobs.

View File

@ -416,6 +416,7 @@ define('pgadmin.node.role', [
deps: ['rolcanlogin'],
placeholder: gettext('No Expiry'),
helpMessage: gettext('Please note that if you leave this field blank, then password will never expire.'),
setMinDate: false,
},{
id: 'rolconnlimit', type: 'int', group: gettext('Definition'),
label: gettext('Connection limit'), cell: 'integer', min : -1,

View File

@ -2820,6 +2820,7 @@ define([
placeholder: 'YYYY-MM-DD HH:mm:ss Z',
extraClasses: [],
helpMessage: null,
setMinDate: true,
},
events: {
'blur input': 'onChange',
@ -3008,6 +3009,18 @@ define([
data.value = null;
}
var dateSettings = {};
if (!data.setMinDate) {
dateSettings = {
'date': data.value,
};
} else {
dateSettings = {
'date': data.value,
'minDate': data.value,
};
}
this.$el.find('input').first().datetimepicker(
_.extend({
keyBinds: {
@ -3044,10 +3057,7 @@ define([
}
},
},
}, this.defaults.options, this.field.get('options'), {
'date': data.value,
'minDate': data.value,
})
}, this.defaults.options, this.field.get('options'), dateSettings)
);
}
this.updateInvalid();