Thread: GRANT access rights on rows

GRANT access rights on rows

From
" Jaromír Kamler"
Date:
Hallo,
I need GRANT some privilegies to one row. I know, that it si possible to do that for columns, but I do not know how do
itfor rows. Any ideas? 

Thanks for your advices.

Jaromik Kamler


Re: GRANT access rights on rows

From
Sean Davis
Date:


On 1/4/06 5:56 PM, "Jaromír Kamler" <kamler@centrum.cz> wrote:

> Hallo,
> I need GRANT some privilegies to one row. I know, that it si possible to do
> that for columns, but I do not know how do it for rows. Any ideas?
>
> Thanks for your advices.

Make a view that contains only the rows that you want to allow access to.
Then, grant access to that view.

Create view as select * from mytable where mytable.id=1;

Hope that helps.

Sean



Re: GRANT access rights on rows

From
Andrew Chambers
Date:
On 23:56 Wed 04 Jan     ,  Jaromír Kamler wrote:
> Hallo,
> I need GRANT some privilegies to one row. I know, that it si possible to do that for columns, but I do not know how
doit for rows. Any ideas? 
>
I believe the conventional method of doing this is to create a view
selecting all the rows you wish to make accessable, then to grant access
to the view.

Regards,
Andy

Re: GRANT access rights on rows

From
Bruno Wolff III
Date:
On Thu, Jan 05, 2006 at 08:25:17 +0000,
  Andrew Chambers <andychambers2002@yahoo.co.uk> wrote:
> On 23:56 Wed 04 Jan     ,  Jaromír Kamler wrote:
> > Hallo,
> > I need GRANT some privilegies to one row. I know, that it si possible to do that for columns, but I do not know how
doit for rows. Any ideas? 
> >
> I believe the conventional method of doing this is to create a view
> selecting all the rows you wish to make accessable, then to grant access
> to the view.

And note that the view can use current_user which may be useful if different
users are supposed to see different rows.

Re: GRANT access rights on rows

From
"A. Kretschmer"
Date:
am  05.01.2006, um  2:42:31 -0600 mailte Bruno Wolff III folgendes:
> > I believe the conventional method of doing this is to create a view
> > selecting all the rows you wish to make accessable, then to grant access
> > to the view.
>
> And note that the view can use current_user which may be useful if different
> users are supposed to see different rows.

Can you explain this with a simple example?


Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

Re: GRANT access rights on rows

From
Bruno Wolff III
Date:
On Thu, Jan 05, 2006 at 09:53:52 +0100,
  "A. Kretschmer" <andreas.kretschmer@schollglas.com> wrote:
> am  05.01.2006, um  2:42:31 -0600 mailte Bruno Wolff III folgendes:
> > > I believe the conventional method of doing this is to create a view
> > > selecting all the rows you wish to make accessable, then to grant access
> > > to the view.
> >
> > And note that the view can use current_user which may be useful if different
> > users are supposed to see different rows.
>
> Can you explain this with a simple example?

For example you might include a user name as a column of a table and then
have a view that lets users only see rows where the username in a row
matches current_user.