dodger
736c6871aa
There are 2 functions, one with "SECURITY INVOKER" and the other with "SECURITY DEFINER". One is to be invoked by the final user and the other one only for the main function.
11 lines
341 B
SQL
11 lines
341 B
SQL
|
|
-- grant usage for schema dba
|
|
grant usage on schema dba to dodger ;
|
|
|
|
-- grant execute on the function that change_my_password the pass but no on the one that change VALID UNTIL
|
|
grant execute on function dba.change_my_password(text) to dodger;
|
|
|
|
-- only insert is needed to allow audit trace
|
|
GRANT INSERT ON TABLE dba.pwdhistory TO dodger;
|
|
|