Subject | Re: Read only user |
---|---|
Author | Adam |
Post date | 2007-10-29T23:26:22Z |
>Clever.
> 2.) if you use FB 2.0
> execute block as
>
> declare variable wTableName varchar(30);
> declare variable wstm varchar(255);
>
> begin
> for
> select
> r.rdb$relation_name
> from
> rdb$relations r
> where
> rdb$view_blr is null and
> rdb$system_flag = 0
> into :wTableName
> do begin
> wstm = 'grant select on ' || wTableName || ' to PEPE;';
> execute statement wstm;
> end
>
> end;
>
However to the OP, I strongly recommend that you never grant rights
directly to a user. Instead, create a role called ReadOnlyUser and
grant the permissions to select to that role. Then grant ReadOnlyUser
to PEPE (and whoever else needs it).
PEPE can then connect with that role.
Adam