Subject | Re: [firebird-support] Grants on views |
---|---|
Author | PenWin |
Post date | 2009-10-21T06:37:29Z |
Still can't get it to work. I thought maybe the problem is that a detail
view needs to have access to master view AND to all tables referenced by
master view, but apparently that is not the case - even after
GRANT SELECT ON master TO VIEW master_some;
GRANT SELECT ON detail TO VIEW master_some;
I can't select from master_some - not to mention that I can't select
even from master_all, which is not dependent on any other view, just
tables (to which it seems to have the correct permissions).
Did anyone ever have a success with granting users database access only
through views?
Pepa Kokes
view needs to have access to master view AND to all tables referenced by
master view, but apparently that is not the case - even after
GRANT SELECT ON master TO VIEW master_some;
GRANT SELECT ON detail TO VIEW master_some;
I can't select from master_some - not to mention that I can't select
even from master_all, which is not dependent on any other view, just
tables (to which it seems to have the correct permissions).
Did anyone ever have a success with granting users database access only
through views?
Pepa Kokes
> Hi!
>
> I just can't figure how to set up rights to select from a view on
> Firebird 1.5. So far I only accessed data through the owner of the
> database (no problem there) or through another user who only had access
> to procedures (which I managed to set up fine). But now I need a
> view-accessing user and it just won't work.
>
> Tables:
> master (id, value)
> detail (id, master_id, value)
>
> Views:
> CREATE VIEW master_all (id, value, some_detail)
> AS SELECT id, value, (SELECT MAX(value) FROM detail WHERE
> master_id=m.id) FROM master m;
>
> CREATE VIEW master_some (id, value, some_detail)
> AS SELECT id, value, some_detail FROM master_all WHERE value>123;
>
> Grants:
> GRANT SELECT ON master_all TO my_user;
> GRANT SELECT ON master_some TO my_user;
> GRANT SELECT ON master TO VIEW master_all;
> GRANT SELECT ON detail TO VIEW master_all;
> GRANT SELECT ON master_all TO VIEW master_some
>
> However, whenever I try to SELECT * FROM (either view) I get an error
> message "no permission for read/select access to table detail". What
> other grant to I need? I definitely do not want to grant my_user access
> to the underlying tables.
>
> Thanks,
>
> Pepa Kokes
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>
>
>