Re: How to remove user specific grant and revoke

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: How to remove user specific grant and revoke
Дата
Msg-id 2751c0ad-1e40-2aa4-eab6-6d3e0f1ff6bd@hot.ee
обсуждение исходный текст
Ответ на Re: How to remove user specific grant and revoke  (Erik Wienhold <ewie@ewie.name>)
Ответы Re: How to remove user specific grant and revoke
Re: How to remove user specific grant and revoke
Список 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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Erik Wienhold
Дата:
Сообщение: Re: How to remove user specific grant and revoke
Следующее
От: Andrus
Дата:
Сообщение: Re: How to remove user specific grant and revoke