Subject Re: GRANT ALL ON all?
Author robertgilland
with slSQL do
begin
clear;
add('SELECT R.RDB$RELATION_NAME');
add('FROM RDB$RELATIONS R');
add('WHERE');
add('( R.RDB$SYSTEM_FLAG = 0 )');
add('AND NOT EXISTS');
add('( SELECT * FROM RDB$USER_PRIVILEGES P');
add(' WHERE ( R.RDB$RELATION_NAME = P.RDB$RELATION_NAME )');
add(' AND( P.RDB$USER = 'PUBLIC' ))');
end;

with result run
GRANT ALL ON "RELATION_NAME" TO PUBLIC

with slSQL do
begin
clear;
add('SELECT R.RDB$PROCEDURE_NAME');
add('FROM RDB$PROCEDURES R');
add('WHERE');
add('NOT EXISTS');
add('( SELECT * FROM RDB$USER_PRIVILEGES P');
add(' WHERE ( R.RDB$PROCEDURE_NAME = P.RDB$RELATION_NAME )');
add(' AND( P.RDB$USER = 'PUBLIC' ))');
end;


with result run
GRANT EXECUTE ON PROCEDURE_NAME TO PUBLIC

Regards,

Robert