Re: How to limit access only to certain records?

From: Jayadevan M <Jayadevan(dot)Maymala(at)ibsplc(dot)com>
To: Andreas <maps(dot)on(at)gmx(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-sql-owner(at)postgresql(dot)org
Subject: Re: How to limit access only to certain records?
Date: 2012-06-22 13:03:25
Message-ID: OFF7618F91.66FB7141-ON65257A25.0047AE1C-65257A25.0047B999@ibsplc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

HI,
>
> is there a way to limit access for some users only to certain records?
>
> e.g. there is a customer table and there are account-managers.
> Could I limit account-manager #1 so that he only can access customers
> only acording to a flag?
>
> Say I create a relation cu_am ( customer_id, account_manager_id ).
> Could I let the database control that account-manager #1 can only see
> customers who are assigned to him in the cu_am-relation?
>
> For now I do this in the front-end but this is easily circumvented for
> anyone who has a clue and uses some other client like psql.
Using a VIEW?
Regards,
Jayadevan

DISCLAIMER:

"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message hari.fuchs 2012-06-22 14:52:35 Re: How to limit access only to certain records?
Previous Message Jov 2012-06-22 12:35:51 Re: How to limit access only to certain records?