From f86f58dc562a862fd2a5dd1d55426aef04541e0e Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Thu, 14 Jan 2021 14:47:52 +0530 Subject: [PATCH] =?UTF-8?q?Revert=20"Ensure=20that=20the=20account=20expir?= =?UTF-8?q?ation=20date=20for=20role/user=20can=E2=80=99t=20be=20older=20t?= =?UTF-8?q?han=20the=20current=20date.=20Fixes=20#6120"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9a47e574e315ebc5d2721d69718edb72bcc91b5a. --- docs/en_US/release_notes_4_30.rst | 1 - .../servers/roles/static/js/role.js | 22 ------------------- 2 files changed, 23 deletions(-) diff --git a/docs/en_US/release_notes_4_30.rst b/docs/en_US/release_notes_4_30.rst index d93250336..6c727a840 100644 --- a/docs/en_US/release_notes_4_30.rst +++ b/docs/en_US/release_notes_4_30.rst @@ -37,7 +37,6 @@ Bug fixes | `Issue #6077 `_ - Fixed accessibility issues in various dialogs. | `Issue #6084 `_ - Fixed TypeError exception in schema diff when selected any identical object. | `Issue #6096 `_ - Updated deployment documentation, refer correctly to uWSGI where Gunicorn had been referenced. -| `Issue #6120 `_ - Ensure that the account expiration date for role/user can’t be older than the current date. | `Issue #6121 `_ - Fixed an issue where the database list in the new connection window is not visible. | `Issue #6128 `_ - Fixed an issue where sequences are not created. | `Issue #6140 `_ - Ensure that verbose logs should be visible for Utility(Backup, Maintenance) jobs. diff --git a/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js b/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js index 966681b9c..68909fd88 100644 --- a/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js +++ b/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js @@ -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 can’t be older than the current date'); - errmsg = gettext('Account expiration date can’t be older than the current date'); - } - this.errorModel.clear().set(err); if (_.size(err)) {