pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
users, address record restrictions
2+ messages / 2 participants
[nested] [flat]

* users, address record restrictions
@ 2005-06-20 18:51 Teunis Peters <teunis@wintersgift.com>
  2005-06-20 23:22 ` Re: users, address record restrictions Michael Fuhr <mike@fuhr.org>
  0 siblings, 1 reply; 2+ messages in thread

From: Teunis Peters @ 2005-06-20 18:51 UTC (permalink / raw)
  To: pgsql-interfaces

I've got an interesting problem - this MIGHT (probably) isn't the right 
forum for this.

however - I'd like to restrict access to specific records and groups of 
records (based on another table) - and I'm not even sure where to start 
looking.  I suspect I actually need to look into triggers and/or 
embedded libraries to solve this (and this means writing it) but I 
haven't figured where to start...

basically per-record (given a set of rules) access restrictions.

Please do let me know where I can ask more :)

Ta!
	- Teunis Peters




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: users, address record restrictions
  2005-06-20 18:51 users, address record restrictions Teunis Peters <teunis@wintersgift.com>
@ 2005-06-20 23:22 ` Michael Fuhr <mike@fuhr.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Fuhr @ 2005-06-20 23:22 UTC (permalink / raw)
  To: Teunis Peters <teunis@wintersgift.com>; +Cc: pgsql-interfaces

On Mon, Jun 20, 2005 at 11:51:11AM -0700, Teunis Peters wrote:
>
> I've got an interesting problem - this MIGHT (probably) isn't the right 
> forum for this.

pgsql-general is usually a good place if you're not sure where a
question belongs.  This doesn't sound much like an interfaces
problem.

> however - I'd like to restrict access to specific records and groups of 
> records (based on another table) - and I'm not even sure where to start 
> looking.

By "access" do you mean SELECT only, or also INSERT, UPDATE, and/or
DELETE?  One possibility might be to use a view with a WHERE clause
that does the restriction.  You'd revoke all privileges from the
underlying tables and grant whatever privileges people need on the
view, possibly adding rules to rewrite INSERT, UPDATE, and DELETE
operations.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-06-20 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-20 18:51 users, address record restrictions Teunis Peters <teunis@wintersgift.com>
2005-06-20 23:22 ` Michael Fuhr <mike@fuhr.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox