From: Toomas Kristin <toomas.kristin@gmail.com>
To: Jean-Philippe Chenel <jp.chenel@live.ca>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Both side privileges
Date: Tue, 14 Jul 2020 16:59:20 +0300
Message-ID: <84AD5C5D-0DBF-429B-BEAC-D8DC01F33395@gmail.com> (raw)
In-Reply-To: <DM6PR10MB2921CDBEC0924127E6811DB8FD610@DM6PR10MB2921.namprd10.prod.outlook.com>
References: <DM6PR10MB292128C43790596EDC8B8800FD600@DM6PR10MB2921.namprd10.prod.outlook.com>
<CAKFQuwbAB1pEvbpz7u1oAMg5ihBu5u=LX8=_VWFSKMpiTQhF-Q@mail.gmail.com>
<DM6PR10MB2921CDBEC0924127E6811DB8FD610@DM6PR10MB2921.namprd10.prod.outlook.com>
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.
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: toomas.kristin@gmail.com, jp.chenel@live.ca, david.g.johnston@gmail.com
Subject: Re: Both side privileges
In-Reply-To: <84AD5C5D-0DBF-429B-BEAC-D8DC01F33395@gmail.com>
References: <DM6PR10MB292128C43790596EDC8B8800FD600@DM6PR10MB2921.namprd10.prod.outlook.com> <CAKFQuwbAB1pEvbpz7u1oAMg5ihBu5u=LX8=_VWFSKMpiTQhF-Q@mail.gmail.com> <DM6PR10MB2921CDBEC0924127E6811DB8FD610@DM6PR10MB2921.namprd10.prod.outlook.com> <84AD5C5D-0DBF-429B-BEAC-D8DC01F33395@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