Re: Design Database, 3 degrees of Users.

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Design Database, 3 degrees of Users.
Date: 2009-07-31 13:11:54
Message-ID: 20090731131153.GK5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2009-07-31 13:13:32 Re: MSSQL to PostgreSQL
Previous Message Thom Brown 2009-07-31 12:47:39 MSSQL to PostgreSQL