Subject | Re: [firebird-support] Grant all to all |
---|---|
Author | Julio César Carrascal Urquijo (MCTS) |
Post date | 2007-03-24T21:40:43Z |
On 3/24/07, rj1102 <rjm@...> wrote:
extend it to apply permissions to all users:
set term ^ ;
create procedure GrantAllTo (
userlogin varchar(31))
as
declare variable PermissionObject varchar(31);
begin
for select rdb$relation_name
from rdb$relations
where rdb$system_flag = 0
into :PermissionObject
do
begin
execute statement 'grant all on ' || :PermissionObject || ' to '
|| UserLogin|| ' with grant option';
end
for select rdb$procedure_name
from rdb$procedures
where rdb$system_flag = 0
into :PermissionObject
do
begin
execute statement 'grant execute on procedure ' ||
:PermissionObject || ' to '
|| UserLogin || ' with grant option';
end
end^
set term ; ^
--
Julio César Carrascal Urquijo
Microsoft Certified Technology Specialist
http://jcesar.3stecnoinformatica.com/
> What is the easiest way to grant all rights to all users for a database.I use the following stored procedure on test databases. You can easily
> I'm looking for something like GRANT ALL TO ALL.
> I.e even when i create a new table in the database, access will be
> automatically granted to all users.
extend it to apply permissions to all users:
set term ^ ;
create procedure GrantAllTo (
userlogin varchar(31))
as
declare variable PermissionObject varchar(31);
begin
for select rdb$relation_name
from rdb$relations
where rdb$system_flag = 0
into :PermissionObject
do
begin
execute statement 'grant all on ' || :PermissionObject || ' to '
|| UserLogin|| ' with grant option';
end
for select rdb$procedure_name
from rdb$procedures
where rdb$system_flag = 0
into :PermissionObject
do
begin
execute statement 'grant execute on procedure ' ||
:PermissionObject || ' to '
|| UserLogin || ' with grant option';
end
end^
set term ; ^
--
Julio César Carrascal Urquijo
Microsoft Certified Technology Specialist
http://jcesar.3stecnoinformatica.com/