Subject | Re: How to make a table read-only? |
---|---|
Author | Adam |
Post date | 2005-09-23T01:26:15Z |
--- In firebird-support@yahoogroups.com, "russellbelding"
<russell@b...> wrote:
rather than the users. You then assign the users to the role.
Firebird will then allow any user within that role whatever
permissions the role is assigned, so it is not as painful as in other
DBMS.
In any case, if you blindly add those triggers then your table will
remain empty forever. You could use the CURRENT_USER context variable.
eg
if (CURRENT_USER<>'SYSDBA') then
begin
exception eGetLost;
end
Another option is to disable those triggers while you populate the
table, then enable them after they are populated. It really depends
on your business requirements, whether you are trying to implement
some sort of security, or whether you are just protecting users from
their own stupidity.
Adam
<russell@b...> wrote:
> Thanks Adam. The list of users changes often. So constraining usesThat is why you use Roles and assign the permissions to the role
> is not attractive.
rather than the users. You then assign the users to the role.
Firebird will then allow any user within that role whatever
permissions the role is assigned, so it is not as painful as in other
DBMS.
> The datafile cannot be made read-only. AddingDatafile or table?
> before-update and before-delete trigggers with exceptions in the
> triggers will allow insertions.
In any case, if you blindly add those triggers then your table will
remain empty forever. You could use the CURRENT_USER context variable.
eg
if (CURRENT_USER<>'SYSDBA') then
begin
exception eGetLost;
end
Another option is to disable those triggers while you populate the
table, then enable them after they are populated. It really depends
on your business requirements, whether you are trying to implement
some sort of security, or whether you are just protecting users from
their own stupidity.
Adam