pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedBoth side privileges
4+ messages / 4 participants
[nested] [flat]
* Both side privileges
@ 2020-07-13 23:42 Jean-Philippe Chenel <jp.chenel@LIVE.CA>
0 siblings, 1 reply; 4+ messages in thread
From: Jean-Philippe Chenel @ 2020-07-13 23:42 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi,
I try to give userA privileges on userB objects and same thing to the userB, giving privileges on userA objects.
Grant userB to userA; —ok
Grant userA to userB; —error: role userB is already member of role userA
How can I do that?
With best regards,
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Both side privileges
@ 2020-07-13 23:46 David G. Johnston <david.g.johnston@gmail.com>
parent: Jean-Philippe Chenel <jp.chenel@LIVE.CA>
0 siblings, 1 reply; 4+ messages in thread
From: David G. Johnston @ 2020-07-13 23:46 UTC (permalink / raw)
To: Jean-Philippe Chenel <jp.chenel@live.ca>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On Mon, Jul 13, 2020 at 4:42 PM Jean-Philippe Chenel <jp.chenel@live.ca>
wrote:
> Hi,
>
> I try to give userA privileges on userB objects and same thing to the
> userB, giving privileges on userA objects.
>
> Grant userB to userA; —ok
> Grant userA to userB; —error: role userB is already member of role userA
>
Create a "group role" that retains ownership and then add both users to
that group.
David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Both side privileges
@ 2020-07-14 13:36 Jean-Philippe Chenel <jp.chenel@live.ca>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Jean-Philippe Chenel @ 2020-07-14 13:36 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Thank for your answer David.
This is what I'll do.
________________________________
De : David G. Johnston <david.g.johnston@gmail.com>
Envoyé : 13 juillet 2020 19:46
À : Jean-Philippe Chenel <jp.chenel@live.ca>
Cc : pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Objet : Re: Both side privileges
On Mon, Jul 13, 2020 at 4:42 PM Jean-Philippe Chenel <jp.chenel@live.ca<mailto:jp.chenel@live.ca>> wrote:
Hi,
I try to give userA privileges on userB objects and same thing to the userB, giving privileges on userA objects.
Grant userB to userA; —ok
Grant userA to userB; —error: role userB is already member of role userA
Create a "group role" that retains ownership and then add both users to that group.
David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Both side privileges
@ 2020-07-14 13:59 Toomas Kristin <toomas.kristin@gmail.com>
parent: Jean-Philippe Chenel <jp.chenel@live.ca>
0 siblings, 0 replies; 4+ messages in thread
From: Toomas Kristin @ 2020-07-14 13:59 UTC (permalink / raw)
To: Jean-Philippe Chenel <jp.chenel@live.ca>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
And please be sure that default permissions are defined properly. Otherwise it may happen that userA creates a new table but userB has access for that. Alternative option is that user has to grant proper access for the role group after every time when a new db object is created.
Toomas
> On 14. Jul 2020, at 16:36, Jean-Philippe Chenel <jp.chenel@live.ca> wrote:
>
> Thank for your answer David.
> This is what I'll do.
> De : David G. Johnston <david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>>
> Envoyé : 13 juillet 2020 19:46
> À : Jean-Philippe Chenel <jp.chenel@live.ca <mailto:jp.chenel@live.ca>>
> Cc : pgsql-general@lists.postgresql.org <mailto:pgsql-general@lists.postgresql.org> <pgsql-general@lists.postgresql.org <mailto:pgsql-general@lists.postgresql.org>>
> Objet : Re: Both side privileges
>
> On Mon, Jul 13, 2020 at 4:42 PM Jean-Philippe Chenel <jp.chenel@live.ca <mailto:jp.chenel@live.ca>> wrote:
> Hi,
>
> I try to give userA privileges on userB objects and same thing to the userB, giving privileges on userA objects.
>
> Grant userB to userA; —ok
> Grant userA to userB; —error: role userB is already member of role userA
>
> Create a "group role" that retains ownership and then add both users to that group.
>
> David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-07-14 13:59 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 23:42 Both side privileges Jean-Philippe Chenel <jp.chenel@LIVE.CA>
2020-07-13 23:46 ` David G. Johnston <david.g.johnston@gmail.com>
2020-07-14 13:36 ` Jean-Philippe Chenel <jp.chenel@live.ca>
2020-07-14 13:59 ` Toomas Kristin <toomas.kristin@gmail.com>
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