Subject: [pgAdmin][RM-6120]: Adding/updating user should not allow to add an older date in account expires.

From: Nikhil Mohite <[email-masked]>
Date: Thu, 14 Jan 2021 11:28:10 +0530

Hi Team,

Please find the attached patch for RM-6120
<https://redmine.postgresql.org/issues/6120>: Adding/updating user should
not allow to add an older date in account expires.
Added UI validation if a user enters the account expiration date manually.

-- 
*Thanks & Regards,*
*Nikhil Mohite*
*Software Engineer.*
*EDB Postgres* <https://www.enterprisedb.com/>
*Mob.No: +91-7798364578.*

---

From: Akshay Joshi <[email-masked]>
Date: Thu, 14 Jan 2021 13:47:54 +0530

Thanks, patch applied.

-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*

---

From: Dave Page <[email-masked]>
Date: Thu, 14 Jan 2021 09:08:10 +0000

On Thu, Jan 14, 2021 at 8:18 AM Akshay Joshi <[email-masked]>
wrote:

>> <https://redmine.postgresql.org/issues/6120>: Adding/updating user
>> should not allow to add an older date in account expires.
I think this needs to be reverted (and the UI fixed to allow an older date
to be selected).

Selecting a past expiry date is a perfectly valid way to create an account
that is effectively locked, for example, to allow pre-creation of roles for
staff that are yet to join.

PostgreSQL doesn't prevent this - why should we?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

---

From: Akshay Joshi <[email-masked]>
Date: Thu, 14 Jan 2021 14:52:08 +0530

Hi Nikhil

On Thu, Jan 14, 2021 at 2:38 PM Dave Page <[email-masked]> wrote:

>
>
> On Thu, Jan 14, 2021 at 8:18 AM Akshay Joshi <
> [email-masked]> wrote:
>
>> Thanks, patch applied.
>>

   Please fixed as suggested by Dave and send the patch. I'll update the RM

---

From: Nikhil Mohite <[email-masked]>
Date: Thu, 14 Jan 2021 17:58:00 +0530

Hi Akshay,

Please find the updated patch, updated UI to allow users to select an older
date for the account expires.

Regards,
Nikhil Mohite.

On Thu, Jan 14, 2021 at 2:52 PM Akshay Joshi <[email-masked]>
wrote:

>> I think this needs to be reverted (and the UI fixed to allow an older
>> date to be selected).
>>
>
>> Selecting a past expiry date is a perfectly valid way to create an
>> account that is effectively locked, for example, to allow pre-creation of
>> roles for staff that are yet to join.
>>

---

From: Akshay Joshi <[email-masked]>
Date: Fri, 15 Jan 2021 11:38:48 +0530

Thanks, patch applied.

On Thu, Jan 14, 2021 at 5:58 PM Nikhil Mohite <
[email-masked]> wrote:

> Hi Akshay,
>
> Please find the updated patch, updated UI to allow users to select an
> older date for the account expires.
>
>
> Regards,
> Nikhil Mohite.
>
> On Thu, Jan 14, 2021 at 2:52 PM Akshay Joshi <