Compare commits
No commits in common. "afd4bc16b7a7f7b29068de03545ef2e8bf42d503" and "c369364642ffd44d3f7992d9c81f96ddfe0492a5" have entirely different histories.
afd4bc16b7
...
c369364642
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
set search_path to public, numerus, auth;
|
set search_path to numerus, auth, public;
|
||||||
|
|
||||||
create or replace function check_cookie(input_cookie text) returns record as
|
create or replace function check_cookie(input_cookie text) returns record as
|
||||||
$$
|
$$
|
||||||
|
|
|
@ -6,7 +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;
|
||||||
|
|
||||||
grant usage on schema public to authenticator;
|
|
||||||
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;
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
drop function if exists public.check_cookie(text);
|
drop function if exists numerus.check_cookie(text);
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
|
@ -9,15 +9,15 @@ select plan(15);
|
||||||
|
|
||||||
set search_path to auth, numerus, public;
|
set search_path to auth, numerus, public;
|
||||||
|
|
||||||
select has_function('public', 'check_cookie', array ['text']);
|
select has_function('check_cookie');
|
||||||
select function_lang_is('public', 'check_cookie', array ['text'], 'plpgsql');
|
select function_lang_is('check_cookie', array ['text'], 'plpgsql');
|
||||||
select function_returns('public', 'check_cookie', array ['text'], 'record');
|
select function_returns('check_cookie', array ['text'], 'record');
|
||||||
select is_definer('public', 'check_cookie', array ['text']);
|
select is_definer('check_cookie', array ['text']);
|
||||||
select volatility_is('public', 'check_cookie', array ['text'], 'stable');
|
select volatility_is('check_cookie', array ['text'], 'stable');
|
||||||
select function_privs_are('public', 'check_cookie', array ['text'], 'guest', array []::text[]);
|
select function_privs_are('check_cookie', array ['text'], 'guest', array []::text[]);
|
||||||
select function_privs_are('public', 'check_cookie', array ['text'], 'invoicer', array []::text[]);
|
select function_privs_are('check_cookie', array ['text'], 'invoicer', array []::text[]);
|
||||||
select function_privs_are('public', 'check_cookie', array ['text'], 'admin', array []::text[]);
|
select function_privs_are('check_cookie', array ['text'], 'admin', array []::text[]);
|
||||||
select function_privs_are('public', 'check_cookie', array ['text'], 'authenticator', array ['EXECUTE']);
|
select function_privs_are('check_cookie', array ['text'], 'authenticator', array ['EXECUTE']);
|
||||||
|
|
||||||
set client_min_messages to warning;
|
set client_min_messages to warning;
|
||||||
truncate auth."user" cascade;
|
truncate auth."user" cascade;
|
||||||
|
|
|
@ -9,15 +9,15 @@ select plan(11);
|
||||||
|
|
||||||
set search_path to auth, numerus, public;
|
set search_path to auth, numerus, public;
|
||||||
|
|
||||||
select has_function('auth', 'encrypt_password', array []::name[]);
|
select has_function('encrypt_password');
|
||||||
select function_lang_is('auth', 'encrypt_password', array []::name[], 'plpgsql');
|
select function_lang_is('encrypt_password', array []::name[], 'plpgsql');
|
||||||
select function_returns('auth', 'encrypt_password', array []::name[], 'trigger');
|
select function_returns('encrypt_password', array []::name[], 'trigger');
|
||||||
select isnt_definer('auth', 'encrypt_password', array []::name[]);
|
select isnt_definer('encrypt_password', array []::name[]);
|
||||||
select volatility_is('auth', 'encrypt_password', array []::name[], 'volatile');
|
select volatility_is('encrypt_password', array []::name[], 'volatile');
|
||||||
select function_privs_are('auth', 'encrypt_password', array []::name[], 'guest', array []::text[]);
|
select function_privs_are('encrypt_password', array []::name[], 'guest', array []::text[]);
|
||||||
select function_privs_are('auth', 'encrypt_password', array []::name[], 'invoicer', array []::text[]);
|
select function_privs_are('encrypt_password', array []::name[], 'invoicer', array []::text[]);
|
||||||
select function_privs_are('auth', 'encrypt_password', array []::name[], 'admin', array []::text[]);
|
select function_privs_are('encrypt_password', array []::name[], 'admin', array []::text[]);
|
||||||
select function_privs_are('auth', 'encrypt_password', array []::name[], 'authenticator', array []::text[]);
|
select function_privs_are('encrypt_password', array []::name[], 'authenticator', array []::text[]);
|
||||||
|
|
||||||
select trigger_is('user', 'encrypt_password', 'encrypt_password');
|
select trigger_is('user', 'encrypt_password', 'encrypt_password');
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,15 @@ select plan(14);
|
||||||
|
|
||||||
set search_path to auth, public;
|
set search_path to auth, public;
|
||||||
|
|
||||||
select has_function('auth', 'ensure_role_exists', array []::name[]);
|
select has_function('ensure_role_exists');
|
||||||
select function_lang_is('auth', 'ensure_role_exists', array []::name[], 'plpgsql');
|
select function_lang_is('ensure_role_exists', array []::name[], 'plpgsql');
|
||||||
select function_returns('auth', 'ensure_role_exists', array []::name[], 'trigger');
|
select function_returns('ensure_role_exists', array []::name[], 'trigger');
|
||||||
select isnt_definer('auth', 'ensure_role_exists', array []::name[]);
|
select isnt_definer('ensure_role_exists', array []::name[]);
|
||||||
select volatility_is('auth', 'ensure_role_exists', array []::name[], 'volatile');
|
select volatility_is('ensure_role_exists', array []::name[], 'volatile');
|
||||||
select function_privs_are('auth', 'ensure_role_exists', array []::name[], 'guest', array []::text[]);
|
select function_privs_are('ensure_role_exists', array []::name[], 'guest', array []::text[]);
|
||||||
select function_privs_are('auth', 'ensure_role_exists', array []::name[], 'invoicer', array []::text[]);
|
select function_privs_are('ensure_role_exists', array []::name[], 'invoicer', array []::text[]);
|
||||||
select function_privs_are('auth', 'ensure_role_exists', array []::name[], 'admin', array []::text[]);
|
select function_privs_are('ensure_role_exists', array []::name[], 'admin', array []::text[]);
|
||||||
select function_privs_are('auth', 'ensure_role_exists', array []::name[], 'authenticator', array []::text[]);
|
select function_privs_are('ensure_role_exists', array []::name[], 'authenticator', array []::text[]);
|
||||||
|
|
||||||
select trigger_is('user', 'ensure_role_exists', 'ensure_role_exists');
|
select trigger_is('user', 'ensure_role_exists', 'ensure_role_exists');
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,15 @@ select plan(20);
|
||||||
|
|
||||||
set search_path to auth, numerus, public;
|
set search_path to auth, numerus, public;
|
||||||
|
|
||||||
select has_function('numerus', 'login', array ['email', 'text', 'inet']);
|
select has_function('login');
|
||||||
select function_lang_is('numerus', 'login', array ['email', 'text', 'inet'], 'plpgsql');
|
select function_lang_is('login', array ['email', 'text', 'inet'], 'plpgsql');
|
||||||
select function_returns('numerus', 'login', array ['email', 'text', 'inet'], 'text');
|
select function_returns('login', array ['email', 'text', 'inet'], 'text');
|
||||||
select is_definer('numerus', 'login', array ['email', 'text', 'inet']);
|
select is_definer('login', array ['email', 'text', 'inet']);
|
||||||
select volatility_is('numerus', 'login', array ['email', 'text', 'inet'], 'volatile');
|
select volatility_is('login', array ['email', 'text', 'inet'], 'volatile');
|
||||||
select function_privs_are('numerus', 'login', array ['email', 'text', 'inet'], 'guest', array ['EXECUTE']);
|
select function_privs_are('login', array ['email', 'text', 'inet'], 'guest', array ['EXECUTE']);
|
||||||
select function_privs_are('numerus', 'login', array ['email', 'text', 'inet'], 'invoicer', array []::text[]);
|
select function_privs_are('login', array ['email', 'text', 'inet'], 'invoicer', array []::text[]);
|
||||||
select function_privs_are('numerus', 'login', array ['email', 'text', 'inet'], 'admin', array []::text[]);
|
select function_privs_are('login', array ['email', 'text', 'inet'], 'admin', array []::text[]);
|
||||||
select function_privs_are('numerus', 'login', array ['email', 'text', 'inet'], 'authenticator', array []::text[]);
|
select function_privs_are('login', array ['email', 'text', 'inet'], 'authenticator', array []::text[]);
|
||||||
|
|
||||||
set client_min_messages to warning;
|
set client_min_messages to warning;
|
||||||
truncate auth."user" cascade;
|
truncate auth."user" cascade;
|
||||||
|
|
|
@ -9,15 +9,15 @@ select plan(15);
|
||||||
|
|
||||||
set search_path to auth, numerus, public;
|
set search_path to auth, numerus, public;
|
||||||
|
|
||||||
select has_function('numerus', 'logout', array []::name[]);
|
select has_function('logout');
|
||||||
select function_lang_is('numerus', 'logout', array []::name[], 'sql');
|
select function_lang_is('logout', array []::text[], 'sql');
|
||||||
select function_returns('numerus', 'logout', array []::name[], 'void');
|
select function_returns('logout', array []::text[], 'void');
|
||||||
select is_definer('numerus', 'logout', array []::name[]);
|
select is_definer('logout', array []::text[]);
|
||||||
select volatility_is('numerus', 'logout', array []::name[], 'volatile');
|
select volatility_is('logout', array []::text[], 'volatile');
|
||||||
select function_privs_are('numerus', 'logout', array []::name[], 'guest', array []::text[]);
|
select function_privs_are('logout', array []::text[], 'guest', array []::text[]);
|
||||||
select function_privs_are('numerus', 'logout', array []::name[], 'invoicer', array ['EXECUTE']);
|
select function_privs_are('logout', array []::text[], 'invoicer', array ['EXECUTE']);
|
||||||
select function_privs_are('numerus', 'logout', array []::name[], 'admin', array ['EXECUTE']);
|
select function_privs_are('logout', array []::text[], 'admin', array ['EXECUTE']);
|
||||||
select function_privs_are('numerus', 'logout', array []::name[], 'authenticator', array []::text[]);
|
select function_privs_are('logout', array []::text[], 'authenticator', array []::text[]);
|
||||||
|
|
||||||
set client_min_messages to warning;
|
set client_min_messages to warning;
|
||||||
truncate auth."user" cascade;
|
truncate auth."user" cascade;
|
||||||
|
|
|
@ -27,7 +27,7 @@ select schema_privs_are('numerus', 'authenticator', array[]::text[]);
|
||||||
select schema_privs_are('public', 'guest', array['USAGE']);
|
select schema_privs_are('public', 'guest', array['USAGE']);
|
||||||
select schema_privs_are('public', 'invoicer', array['USAGE']);
|
select schema_privs_are('public', 'invoicer', array['USAGE']);
|
||||||
select schema_privs_are('public', 'admin', array['USAGE']);
|
select schema_privs_are('public', 'admin', array['USAGE']);
|
||||||
select schema_privs_are('public', 'authenticator', array['USAGE']);
|
select schema_privs_are('public', 'authenticator', array[]::text[]);
|
||||||
|
|
||||||
select schema_privs_are('sqitch', 'guest', array[]::text[]);
|
select schema_privs_are('sqitch', 'guest', array[]::text[]);
|
||||||
select schema_privs_are('sqitch', 'invoicer', array[]::text[]);
|
select schema_privs_are('sqitch', 'invoicer', array[]::text[]);
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
select has_function_privilege('public.check_cookie(text)', 'execute');
|
select has_function_privilege('numerus.check_cookie(text)', 'execute');
|
||||||
|
|
||||||
rollback;
|
rollback;
|
||||||
|
|
Loading…
Reference in New Issue