From: | Andrus <kobruleht2(at)hot(dot)ee> |
---|---|
To: | Erik Wienhold <ewie(at)ewie(dot)name>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to remove user specific grant and revoke |
Date: | 2023-06-03 21:34:32 |
Message-ID: | 2751c0ad-1e40-2aa4-eab6-6d3e0f1ff6bd@hot.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi!
>> After this command pgAdmin still shows revoke and grant commands for
>> alekspoluh role.
>> How to remove all grant and revoke assignments for role ?
> Please confirm that \dp public.kaspriv no longer shows an ACL for alekspoluh
> after running:
>
> REVOKE ALL ON public.kaspriv FROM alekspoluh;
psql (12.2 (Debian 12.2-2.pgdg100+1))
Type "help" for help.
sba=# REVOKE ALL ON public.kaspriv FROM alekspoluh;
REVOKE
sba=# \o result.txt
sba=# \dp public.kaspriv
sba=# \q
#grep alekspoluh result.txt
Returns nothing. So output does not contain this role.
> There must be something wrong with pgAdmin if it still shows REVOKE ALL for
> that role after its ACL is gone. Looking at the code, pgAdmin emits REVOKE ALL
> for any grantee it find in the ACL.
>
> https://github.com/pgadmin-org/pgadmin4/blob/REL-7_2/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py#L712
I re-opened pgadmin. alekspoluh role is no more displayed in kaspriv
table sql window.
pgadmin shows only single reset role command. Now it shows
REVOKE ALL ON TABLE public.kaspriv FROM yllelohmus;
I ran
REVOKE ALL ON TABLE public.kaspriv FROM yllelohmus;
After that pgadmin shows next single revoke command:
REVOKE ALL ON TABLE public.kaspriv FROM villuuus;
It looks like pgAdmin shows only one REVOKE command but actually there
are more revokes.
Should I ran separate revoke commands for every user to remove those
revokes ?
pgAdmin also shows about 100 grant commands for users like
GRANT SELECT ON TABLE public.kaspriv TO paide;
How to remove user-spefic grants ?
Andrus.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrus | 2023-06-03 22:08:46 | Re: How to remove user specific grant and revoke |
Previous Message | Erik Wienhold | 2023-06-03 20:57:56 | Re: How to remove user specific grant and revoke |