Remove the revocation of all function executions
I need to execute some functions in public for citext, such as texticregexeq, or guest users would not be able to login.
This commit is contained in:
parent
989cdd7da7
commit
45439c8559
|
@ -21,6 +21,8 @@ language plpgsql;
|
||||||
comment on function encrypt_password() is
|
comment on function encrypt_password() is
|
||||||
'Encrypts and salts the input password with the blowfish encryption algorithm';
|
'Encrypts and salts the input password with the blowfish encryption algorithm';
|
||||||
|
|
||||||
|
revoke execute on function encrypt_password() from public;
|
||||||
|
|
||||||
create trigger encrypt_password
|
create trigger encrypt_password
|
||||||
before insert or update
|
before insert or update
|
||||||
on "user"
|
on "user"
|
||||||
|
|
|
@ -20,6 +20,8 @@ language plpgsql;
|
||||||
comment on function ensure_role_exists() is
|
comment on function ensure_role_exists() is
|
||||||
'Makes sure that a role given to a user is a valid, existing role in the cluster.';
|
'Makes sure that a role given to a user is a valid, existing role in the cluster.';
|
||||||
|
|
||||||
|
revoke execute on function ensure_role_exists() from public;
|
||||||
|
|
||||||
create trigger ensure_role_exists
|
create trigger ensure_role_exists
|
||||||
after insert or update
|
after insert or update
|
||||||
on "user"
|
on "user"
|
||||||
|
|
|
@ -21,4 +21,6 @@ stable;
|
||||||
comment on function find_user_role(email, text) is
|
comment on function find_user_role(email, text) is
|
||||||
'Return the database role assigned to the user with the given email and password';
|
'Return the database role assigned to the user with the given email and password';
|
||||||
|
|
||||||
|
revoke execute on function find_user_role(email, text) from public;
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
|
@ -28,6 +28,7 @@ security definer;
|
||||||
comment on function login(email, text) is
|
comment on function login(email, text) is
|
||||||
'Checks that the email and password pair is valid and returns the user’s databasse role.';
|
'Checks that the email and password pair is valid and returns the user’s databasse role.';
|
||||||
|
|
||||||
|
revoke execute on function login(email, text) from public;
|
||||||
grant execute on function login(email, text) to guest;
|
grant execute on function login(email, text) to guest;
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
|
@ -6,8 +6,6 @@ begin;
|
||||||
revoke create on schema public from public;
|
revoke create on schema public from public;
|
||||||
revoke usage on schema public from public;
|
revoke usage on schema public from public;
|
||||||
|
|
||||||
alter default privileges revoke execute on functions from public;
|
|
||||||
|
|
||||||
grant usage on schema public to guest;
|
grant usage on schema public to guest;
|
||||||
grant usage on schema public to invoicer;
|
grant usage on schema public to invoicer;
|
||||||
grant usage on schema public to admin;
|
grant usage on schema public to admin;
|
||||||
|
|
Loading…
Reference in New Issue