Re: Need help revoking access WHERE state = 'deleted'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Need help revoking access WHERE state = 'deleted'
Дата
Msg-id 9963.1362078492@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Need help revoking access WHERE state = 'deleted'  (Mark Stosberg <mark@summersault.com>)
Ответы Re: Need help revoking access WHERE state = 'deleted'  (Mark Stosberg <mark@summersault.com>)
Список pgsql-sql
Mark Stosberg <mark@summersault.com> writes:
> # Explicitly grant access to the view.
> db=> grant select on entities_not_deleted to myuser;
> GRANT

> # Try again to use the view. Still fails
> db=> SELECT 1 FROM entities_not_deleted WHERE some_col = 'y';
> ERROR:  permission denied for relation entities

What's failing is that the *owner of the view* needs, and hasn't got,
select access on the entities table.  This is a separate check from
whether the current user has permission to select from the view.
Without such a check, views would be a security hole.
        regards, tom lane



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

Предыдущее
От: Mark Stosberg
Дата:
Сообщение: Re: Need help revoking access WHERE state = 'deleted'
Следующее
От: Mark Stosberg
Дата:
Сообщение: Re: Need help revoking access WHERE state = 'deleted'