Re: row-level security model

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: row-level security model
Дата
Msg-id A1448660-840D-11D8-8F82-000A95B03262@icx.net
обсуждение исходный текст
Ответ на Re: row-level security model  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
On Apr 1, 2004, at 10:26 AM, Bruno Wolff III wrote:

> You should be able to do this with a view. current_user will give you
> the user. You probably want to join this with your own group table
> and with the table of interest. If each row belongs to only one group
> this is easy.


I'm still not clear on how this would work. Let me provide a more
concrete example and perhaps you can give me a little more help on how
the view model would work.

Suppose I have a school database. Teachers have a many-to-many
relationship with their sections (classes). Students also have a
many-to-many relationship with the section table. So the teacher group
should be able to view the student records for any student in any of
their classes. My second group is parents. The parent and student
tables also have a many-to-many relationship. So when a parent logs in
they should be able to view any student for which they are a primary
contact. Now what if Sam is both parent and teacher groups. He should
be able to view the students in his class as well as any students for
which he is the guardian.

Best,

John DeSoi, Ph.D.


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

Предыдущее
От: Diogo Biazus
Дата:
Сообщение: Re: Wich hardware suits best for large full-text indexed
Следующее
От: John DeSoi
Дата:
Сообщение: Re: row-level security model