pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nicolas Paris <nicolas.paris@riseup.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Default Privilege Table ANY ROLE
Date: Wed, 14 Nov 2018 20:11:00 +0100
Message-ID: <20181114190815.72lprnsyh4w7c67c@riseup.net> (raw)
In-Reply-To: <787f53ab-01fc-f022-f699-b7a84e30d74e@gmail.com>
References: <20181114141608.ryvolxl7v7z2grzi@riseup.net>
	<787f53ab-01fc-f022-f699-b7a84e30d74e@gmail.com>

On Wed, Nov 14, 2018 at 10:05:51AM -0600, Ron wrote:
> On 11/14/2018 08:19 AM, Nicolas Paris wrote:
> > Hi
> > 
> > I d'like my user be able to select on any new table from other users.
> > 
> Would ROLE Groups solve your problem?


Maybe yes, not sure what it is. I tested this:

> create role myrolegroup;
> ALTER DEFAULT PRIVILEGES  FOR  ROLE "myrolegroup"  IN SCHEMA "myschema" GRANT  select ON TABLES TO "myuser";
> create myuser1 inherit  in role myrolegroup;
> create myuser2 inherit  in role myrolegroup;

But if myuser2 creates a table, then myuser1 cannot select on it. I
guess that's because inheritance only apply for GRANT (which is
distinct from DEFAUL PRIVILEGE).


Thanks,

-- 
nicolas




view thread (11+ messages)  latest in thread

Message-ID: <20181114190815.72lprnsyh4w7c67c@riseup.net>
Permalink:  ../20181114190815.72lprnsyh4w7c67c@riseup.net/
Also on:    postgresql.org/message-id/20181114190815.72lprnsyh4w7c67c@riseup.net

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: nicolas.paris@riseup.net
  Subject: Re: Default Privilege Table ANY ROLE
  In-Reply-To: <20181114190815.72lprnsyh4w7c67c@riseup.net>
  References: <20181114141608.ryvolxl7v7z2grzi@riseup.net> <787f53ab-01fc-f022-f699-b7a84e30d74e@gmail.com> <20181114190815.72lprnsyh4w7c67c@riseup.net>

* 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