Subject Re: [ib-support] Role/permission question
Author Claudio Valderrama C.
""Hidayat Henokh"" <hidayat@...> wrote in message
news:001401c1b2df$0eef4ee0$3500a8c0@......
> dear all
>
> 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'

Create a table that defines the equivalence between the allowed value and
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