Re: How to remove user specific grant and revoke
От | Andrus |
---|---|
Тема | Re: How to remove user specific grant and revoke |
Дата | |
Msg-id | 3d59b000-0964-4a32-faab-ea8a3adf10b8@hot.ee обсуждение исходный текст |
Ответ на | Re: How to remove user specific grant and revoke (Andrus <kobruleht2@hot.ee>) |
Ответы |
Re: How to remove user specific grant and revoke
|
Список | pgsql-general |
Should I ran separate revoke commands for every user to remove those revokes ? How to remove user-spefic grants ?
After running revoke commands in psql, GRANT commands disappeared magically. It looks like pgAdmin does not allow execute REVOKO commands.
After running script which adds user group tabel modification rights for admin users:
CREATE POLICY kaspriv_sel_policy ON kaspriv FOR SELECT USING (true);
CREATE POLICY kaspriv_mod_policy ON kaspriv USING (
lower(kasutaja)= current_user OR kasutaja in
( select kasutaja from kasutaja where ','||firmad||','
LIKE '%,'|| (select firmad from kasutaja where lower(kasutaja)= current_user) || ',%'
)
);
ALTER TABLE kaspriv ENABLE ROW LEVEL SECURITY;
revoke all on kaspriv from public;
grant select on kaspriv to public;
grant insert, update, delete on kaspriv to admin1, admin2;
pgAdmin shows revoke commands for those users:
REVOKE ALL ON TABLE public.kaspriv FROM admin1;
REVOKE ALL ON TABLE public.kaspriv FROM admin2;
How to prevent pgAdmin to show those revokes?
Andrus.
В списке pgsql-general по дате отправления: