View Single Post

  #3 (permalink)  
Old 11-03-2005
Matthijs Holter
 
Posts: n/a
Default Re: Granting rights on specific tuples?

Thanks, Giuseppe!

- Matthijs

"Giuseppe Maxia" <gmax_@_cpan_._org> skrev i melding
news:4369f57a$0$22301$4fafbaef@reader1.news.tin.it ...
> Matthijs Holter wrote:
>> Hi!
>>
>> I'm setting up a multi-user system where I want different users to have
>> access to different tuples in the same schema. So that, for instance,
>> userA and userB both have access to the schema "Cars (color, age)", but
>> only userA has access to "car1 red 12" and userB has access to "car2 blue
>> 1".
>>
>> Is there any way to set these rights in SQL?
>>
>> - Matthijs

>
> Yes. Using views.
> http://dev.mysql.com/doc/refman/5.0/en/create-view.html
>
> Don't give access to the table, but create as many views as you need
> to implement your profiles, and then give rights to these views
> (they could be updatable also).
>
> You can also enforce a constraint
> http://www.livejournal.com/users/arjen_lentz/49881.html
>
> ciao
> gmax
>
> --
> _ _ _ _
> (_|| | |(_|><
> _|
> http://gmax.oltrelinux.com



Reply With Quote