From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Temporarily disable a role
Date: Mon, 11 Jun 2018 03:42:32 -0500
Message-ID: <a09bccf9-df21-17f2-8e0a-c6cacfe8855d@gmail.com> (raw)
In-Reply-To: <CA+zFF0d4gCCD4StWmzPLoUW79X+tvB5vc9o-eh666AM3GVbX2w@mail.gmail.com>
References: <CA+zFF0d4gCCD4StWmzPLoUW79X+tvB5vc9o-eh666AM3GVbX2w@mail.gmail.com>
On 06/11/2018 03:24 AM, Yinjie Lin wrote:
> Hello everyone.
>
> I'm wondering if there is any way we could disable a role temporarily, and
> enable it later.
>
> For example, there are two users u1 and u2. User u1 grants the privileges
> of its table t1 to role r1:
>
> grant all on t1 to r1;
>
>
> Then, role r1 is granted to user u2:
>
> grant r1 to u2;
>
>
> Now user u2 should have access to table t1. Here is my question: can we
> disable role r1 so that user u2 will not have permissions on table t1?
> Note that role r1 is not removed, so we can enable it later.
>
> I expected ALTER ROLE would have some options dealing with this, but could
> not find a proper way. Does anyone have ideas? Thanks in advance.
Why not revoke r1 from u2?
--
Angular momentum makes the world go 'round.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Temporarily disable a role
In-Reply-To: <a09bccf9-df21-17f2-8e0a-c6cacfe8855d@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox