Subject | Re: [ib-support] Role/permission question |
---|---|
Author | Claudio Valderrama C. |
Post date | 2002-02-12T05:43:46Z |
""Hidayat Henokh"" <hidayat@...> wrote in message
news:001401c1b2df$0eef4ee0$3500a8c0@......
the user's name. Two columns: val & allowed_user.
Now, create a view where you join your table a with the equivalence table.
Write triggers for that view, they will insert, delete and update the
original table a.
The view is somewhat like
create view v
as select a.some_field, a.another_field
from yourtable a join equivalence e
on a.val = e.val
and e.allowed_user = current_user;
Grant rights to users only to use the view, not yourtable and not
equivalence. Grant to the view the rights to use both tables.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing
news:001401c1b2df$0eef4ee0$3500a8c0@......
> dear allCreate a table that defines the equivalence between the allowed value and
>
> i am sorry if my english is very bad
>
> for example
> user a can only select&update record in table a
> which field abc has value '1' and
> user b can only select&update record in table a
> which field abc has value '2'
the user's name. Two columns: val & allowed_user.
Now, create a view where you join your table a with the equivalence table.
Write triggers for that view, they will insert, delete and update the
original table a.
The view is somewhat like
create view v
as select a.some_field, a.another_field
from yourtable a join equivalence e
on a.val = e.val
and e.allowed_user = current_user;
Grant rights to users only to use the view, not yourtable and not
equivalence. Grant to the view the rights to use both tables.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing