Revert "Ensure that the account expiration date for role/user can’t be older than the current date. Fixes #6120"

This reverts commit 9a47e574e3.
This commit is contained in:
Akshay Joshi 2021-01-14 14:47:52 +05:30
parent f0debdd513
commit f86f58dc56
2 changed files with 0 additions and 23 deletions

View File

@ -37,7 +37,6 @@ Bug fixes
| `Issue #6077 <https://redmine.postgresql.org/issues/6077>`_ - Fixed accessibility issues in various dialogs. | `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 #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 #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 account expiration date for role/user cant be older than the current date.
| `Issue #6121 <https://redmine.postgresql.org/issues/6121>`_ - Fixed an issue where the database list in the new connection window is not visible. | `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 #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. | `Issue #6140 <https://redmine.postgresql.org/issues/6140>`_ - Ensure that verbose logs should be visible for Utility(Backup, Maintenance) jobs.

View File

@ -562,28 +562,6 @@ define('pgadmin.node.role', [
} }
} }
// Check Account expiration date should not be older than current selected date.
let currdate = null;
let oldDate = null;
if(this.get('rolvaliduntil') != this.origSessAttrs.rolvaliduntil && this.get('rolvaliduntil') != '' && this.origSessAttrs.rolvaliduntil != 'infinity') {
currdate = new Date(this.get('rolvaliduntil'));
oldDate = new Date(this.origSessAttrs.rolvaliduntil);
} else if (this.origSessAttrs.rolvaliduntil == 'infinity') {
if(this.get('rolvaliduntil') == '') {
let $el = this.panelEl.find('.datetimepicker-input');
currdate = $el.data('datetimepicker').date().clone()._d;
} else {
currdate = new Date(this.get('rolvaliduntil'));
}
oldDate = new Date();
oldDate.setHours(0,0,0,0);
}
if(currdate < oldDate) {
err['rolvaliduntil'] = gettext('Account expiration date cant be older than the current date');
errmsg = gettext('Account expiration date cant be older than the current date');
}
this.errorModel.clear().set(err); this.errorModel.clear().set(err);
if (_.size(err)) { if (_.size(err)) {