Re: GRANT SELECT ON ALL TABLES IN SCHEMA... doesn't apply to new tables?

Поиск
Список
Период
Сортировка
От Christopher Swingley
Тема Re: GRANT SELECT ON ALL TABLES IN SCHEMA... doesn't apply to new tables?
Дата
Msg-id CAHsw449_9f4CP-Ggeh4B9OFNoqKR6sO4bbF=L==2n2GBVE2KZA@mail.gmail.com
обсуждение исходный текст
Ответ на GRANT SELECT ON ALL TABLES IN SCHEMA... doesn't apply to new tables?  (Larry Rosenman <ler@lerctr.org>)
Список pgsql-sql
Larry,

On Fri, Dec 14, 2018 at 17:14 Larry Rosenman <ler@lerctr.org> wrote:
I have the following grant in effect:
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly;

We occasionally add tables to that schema, but the readonly role
can't read them. 

What you want is to apply default privileges to the roles that will be creating new objects:


Your existing GRANT will take care of the tables you have, default privileges will set permissions on new tables. \ddp shows the in psql.

Cheers,

Chris

--
Christopher Swingley
Fairbanks, Alaska
http://swingleydev.com/
cswingle@swingleydev.com

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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: GRANT SELECT ON ALL TABLES IN SCHEMA... doesn't apply to new tables?
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: GRANT SELECT ON ALL TABLES IN SCHEMA... doesn't apply to new tables?