MySQL Forums
Forum List  »  General

Re: Using views for access control. How?
Posted by: Oleksandr Byelkin
Date: December 25, 2005 02:11PM

I am not sure that I understand correctly what you want, but I answer on what I understand.

To get access to a view for SELECT/UPDATE/INSERT and so on (i.e. usual tables operation) you should use usual tables grants (a view is a table).

i.e.:

create view progect1_data as select * from data where data.project_id=1;
or
create view project1_data as select proj1_related_field1, proj1_related_field2, proj1_related_field3 from data;

grant SELECT on progect1_data to some_user@some_host;

Mr. Oleksandr Byelkin
MySQL AB, Full-Time Developer
Lugansk, Ukraine

Options: ReplyQuote


Subject
Written By
Posted
December 22, 2005 04:43AM
Re: Using views for access control. How?
December 25, 2005 02:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.