Re: Design Database, 3 degrees of Users.

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Design Database, 3 degrees of Users.
Дата
Msg-id 20090731131153.GK5407@samason.me.uk
обсуждение исходный текст
Ответ на Design Database, 3 degrees of Users.  (Andre Lopes <lopes80andre@gmail.com>)
Список pgsql-general
On Fri, Jul 31, 2009 at 12:38:30PM +0100, Andre Lopes wrote:
> I need to design a Database that will handle 3 degrees of users:
>
> Administrators - They can see all the information in the database.
> Managers - They only can see the information of his dependants.
> Dependants - Theirs action must be aprovet by the managers.
>
> Wich the best way to implement this in PostGreSQL? There is some database
> examples doing this? Some OpenSource Project?

Depends on how much this separation should be done inside the database,
and how much outside the database.  Within PG, the things that will help
you are roles[1], views[2], and functions[3] with "security definer"
set.

--
  Sam  http://samason.me.uk/

 [1] http://www.postgresql.org/docs/current/static/user-manag.html
 [2] http://www.postgresql.org/docs/current/static/sql-createview.html
 [3] http://www.postgresql.org/docs/current/static/sql-createfunction.html

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

Предыдущее
От: Thom Brown
Дата:
Сообщение: MSSQL to PostgreSQL
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: MSSQL to PostgreSQL