From 0220064d2ef0abf7c9e7bfadc4b6e3b5c166af1c Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 22 May 2017 21:15:10 -0500 Subject: [PATCH] Bugfix: add missing column 'can_manage_roles' in public.v_users_self I originally intended to only provide the necessary columns. However, in an attempt to simplify the PHP end of this, I decided to add NULL columns for such cases. When I did this, I overlooked the 'can_manage_roles' column. Looking at this, I might also be better of setting the values to FALSE instead of null::bool where is can be easily determined to be FALSE. --- database/sql/standard/standard-users.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/sql/standard/standard-users.sql b/database/sql/standard/standard-users.sql index b727b6e..58ae62e 100644 --- a/database/sql/standard/standard-users.sql +++ b/database/sql/standard/standard-users.sql @@ -136,7 +136,7 @@ create view s_users.v_users_self_update with (security_barrier=true) as /**** anonymous user has uid = 1 ****/ create view public.v_users_self with (security_barrier=true) as - select id, id_external, id_sort, name_machine, name_human, address_email, is_administer, is_manager, is_auditor, is_publisher, is_insurer, is_financer, is_reviewer, is_editor, is_drafter, is_requester, is_system, is_public, is_locked, is_private, is_deleted, date_created, date_changed, date_synced, date_locked, null::timestamp as date_deleted, settings from s_tables.t_users + select id, id_external, id_sort, name_machine, name_human, address_email, is_administer, is_manager, is_auditor, is_publisher, is_insurer, is_financer, is_reviewer, is_editor, is_drafter, is_requester, is_system, is_public, is_locked, is_private, is_deleted, can_manage_roles, date_created, date_changed, date_synced, date_locked, null::timestamp as date_deleted, settings from s_tables.t_users where not is_deleted and id = 1; -- 1.8.3.1