From 2841b8f3dfd9d38c18f4f7cc636e622d24f9481f Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 11:59:30 -0600 Subject: [PATCH 01/35] Add vz-admin to tables through atd_txdot__injry_sev_lkp; revoke insert/update permissions on lkp tables --- ...public_atd__coordination_partners_lkp.yaml | 7 +++ .../tables/public_atd__mode_category_lkp.yaml | 8 +++ ...public_atd__recommendation_status_lkp.yaml | 7 +++ .../tables/public_atd_apd_blueform.yaml | 53 +++++++++++++++++++ ...ic_atd_location_crash_and_cost_totals.yaml | 11 ++++ .../public_atd_txdot__asmp_level_lkp.yaml | 6 +++ .../tables/public_atd_txdot__city_lkp.yaml | 8 +++ .../tables/public_atd_txdot__collsn_lkp.yaml | 17 ++---- .../public_atd_txdot__contrib_factr_lkp.yaml | 9 ++++ .../public_atd_txdot__est_comp_cost.yaml | 6 +++ ..._atd_txdot__est_comp_cost_crash_based.yaml | 7 +++ .../public_atd_txdot__ethnicity_lkp.yaml | 19 ++----- .../tables/public_atd_txdot__gndr_lkp.yaml | 19 ++----- .../public_atd_txdot__injry_sev_lkp.yaml | 17 ++---- 14 files changed, 134 insertions(+), 60 deletions(-) diff --git a/atd-vzd/metadata/databases/default/tables/public_atd__coordination_partners_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd__coordination_partners_lkp.yaml index 51bcabb28..103ab3ea4 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd__coordination_partners_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd__coordination_partners_lkp.yaml @@ -10,6 +10,13 @@ array_relationships: name: recommendations_partners schema: public select_permissions: + - role: vz-admin + permission: + columns: + - coord_partner_desc + - id + filter: {} + comment: "" - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd__mode_category_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd__mode_category_lkp.yaml index e2de29f2f..db1cc1b9f 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd__mode_category_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd__mode_category_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd__mode_category_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - atd_mode_category_desc + - atd_mode_category_mode_name + - id + filter: {} + comment: "" - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd__recommendation_status_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd__recommendation_status_lkp.yaml index 2e3865e81..62f68ed58 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd__recommendation_status_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd__recommendation_status_lkp.yaml @@ -10,6 +10,13 @@ array_relationships: name: recommendations schema: public select_permissions: + - role: vz-admin + permission: + columns: + - id + - rec_status_desc + filter: {} + comment: "" - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_apd_blueform.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_apd_blueform.yaml index 433786c5b..3134eea6a 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_apd_blueform.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_apd_blueform.yaml @@ -2,6 +2,23 @@ table: name: atd_apd_blueform schema: public insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - address + - case_id + - date + - est_comp_cost + - est_comp_cost_crash_based + - est_econ_cost + - form_id + - hour + - latitude + - location_id + - longitude + - position + - speed_mgmt_points - role: editor permission: check: {} @@ -20,6 +37,24 @@ insert_permissions: - position - speed_mgmt_points select_permissions: + - role: vz-admin + permission: + columns: + - address + - case_id + - date + - est_comp_cost + - est_comp_cost_crash_based + - est_econ_cost + - form_id + - hour + - latitude + - location_id + - longitude + - position + - speed_mgmt_points + filter: {} + allow_aggregations: true - role: editor permission: columns: @@ -57,6 +92,24 @@ select_permissions: filter: {} allow_aggregations: true update_permissions: + - role: vz-admin + permission: + columns: + - address + - case_id + - date + - est_comp_cost + - est_comp_cost_crash_based + - est_econ_cost + - form_id + - hour + - latitude + - location_id + - longitude + - position + - speed_mgmt_points + filter: {} + check: null - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_location_crash_and_cost_totals.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_location_crash_and_cost_totals.yaml index a75cb6619..7821f55c6 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_location_crash_and_cost_totals.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_location_crash_and_cost_totals.yaml @@ -2,6 +2,17 @@ table: name: atd_location_crash_and_cost_totals schema: public select_permissions: + - role: vz-admin + permission: + columns: + - cr3_est_comp_cost + - cr3_total_crashes + - location_id + - noncr3_est_comp_cost + - noncr3_total_crashes + - total_crashes + - total_est_comp_cost + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__asmp_level_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__asmp_level_lkp.yaml index c803a9365..b44f5cd46 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__asmp_level_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__asmp_level_lkp.yaml @@ -2,6 +2,12 @@ table: name: atd_txdot__asmp_level_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - asmp_level_desc + - asmp_level_id + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__city_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__city_lkp.yaml index 5fb2460b3..bb843a2a5 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__city_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__city_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__city_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - city_id + - city_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__collsn_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__collsn_lkp.yaml index 34a0aa9d2..e4cc5bbc3 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__collsn_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__collsn_lkp.yaml @@ -1,17 +1,8 @@ table: name: atd_txdot__collsn_lkp schema: public -insert_permissions: - - role: editor - permission: - check: {} - columns: - - collsn_id - - collsn_desc - - eff_beg_date - - eff_end_date select_permissions: - - role: editor + - role: vz-admin permission: columns: - collsn_id @@ -19,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: editor permission: columns: - collsn_id @@ -27,8 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} -update_permissions: - - role: editor + - role: readonly permission: columns: - collsn_id @@ -36,4 +26,3 @@ update_permissions: - eff_beg_date - eff_end_date filter: {} - check: null diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__contrib_factr_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__contrib_factr_lkp.yaml index 87858ecb5..93f0cbd5a 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__contrib_factr_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__contrib_factr_lkp.yaml @@ -2,6 +2,15 @@ table: name: atd_txdot__contrib_factr_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - contrib_factr_id + - contrib_factr_desc + - eff_beg_date + - eff_end_date + - other + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost.yaml index d57084005..781af97b6 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost.yaml @@ -2,6 +2,12 @@ table: name: atd_txdot__est_comp_cost schema: public select_permissions: + - role: vz-admin + permission: + columns: + - est_comp_cost_amount + - est_comp_cost_id + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost_crash_based.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost_crash_based.yaml index 5f7d63f8a..e8cf1c717 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost_crash_based.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost_crash_based.yaml @@ -2,6 +2,13 @@ table: name: atd_txdot__est_comp_cost_crash_based schema: public select_permissions: + - role: vz-admin + permission: + columns: + - est_comp_cost_id + - est_comp_cost_amount + - est_comp_cost_desc + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__ethnicity_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__ethnicity_lkp.yaml index 63d307f3e..61a9c6261 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__ethnicity_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__ethnicity_lkp.yaml @@ -1,35 +1,22 @@ table: name: atd_txdot__ethnicity_lkp schema: public -insert_permissions: - - role: editor - permission: - check: {} - columns: - - ethnicity_desc - - ethnicity_id select_permissions: - - role: editor + - role: vz-admin permission: columns: - ethnicity_desc - ethnicity_id filter: {} - - role: readonly + - role: editor permission: columns: - ethnicity_desc - ethnicity_id filter: {} -update_permissions: - - role: editor + - role: readonly permission: columns: - ethnicity_desc - ethnicity_id filter: {} - check: null -delete_permissions: - - role: editor - permission: - filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__gndr_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__gndr_lkp.yaml index d714d1e78..5192b0920 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__gndr_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__gndr_lkp.yaml @@ -1,35 +1,22 @@ table: name: atd_txdot__gndr_lkp schema: public -insert_permissions: - - role: editor - permission: - check: {} - columns: - - gndr_desc - - gndr_id select_permissions: - - role: editor + - role: vz-admin permission: columns: - gndr_desc - gndr_id filter: {} - - role: readonly + - role: editor permission: columns: - gndr_desc - gndr_id filter: {} -update_permissions: - - role: editor + - role: readonly permission: columns: - gndr_desc - gndr_id filter: {} - check: null -delete_permissions: - - role: editor - permission: - filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__injry_sev_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__injry_sev_lkp.yaml index 23816a8bc..64889d02a 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__injry_sev_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__injry_sev_lkp.yaml @@ -9,16 +9,15 @@ array_relationships: table: name: atd_txdot_person schema: public -insert_permissions: - - role: editor +select_permissions: + - role: vz-admin permission: - check: {} columns: - injry_sev_id - eff_beg_date - eff_end_date - injry_sev_desc -select_permissions: + filter: {} - role: editor permission: columns: @@ -33,13 +32,3 @@ select_permissions: - injry_sev_desc - injry_sev_id filter: {} -update_permissions: - - role: editor - permission: - columns: - - injry_sev_id - - eff_beg_date - - eff_end_date - - injry_sev_desc - filter: {} - check: null From f0068389f2af88b898c6b030683c5c822f5df817 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 12:13:48 -0600 Subject: [PATCH 02/35] Add vz-admin to tables through atd_txdot__y_n_lkp --- .../public_atd_txdot__intrsct_relat_lkp.yaml | 8 ++++++++ .../tables/public_atd_txdot__light_cond_lkp.yaml | 6 ++++++ .../tables/public_atd_txdot__movt_lkp.yaml | 6 ++++++ .../tables/public_atd_txdot__obj_struck_lkp.yaml | 8 ++++++++ .../tables/public_atd_txdot__prsn_type_lkp.yaml | 6 ++++++ .../tables/public_atd_txdot__road_part_lkp.yaml | 8 ++++++++ .../tables/public_atd_txdot__road_type_lkp.yaml | 8 ++++++++ .../tables/public_atd_txdot__rwy_sys_lkp.yaml | 8 ++++++++ .../tables/public_atd_txdot__street_sfx_lkp.yaml | 16 ++++++++++++++++ .../public_atd_txdot__traffic_cntl_lkp.yaml | 8 ++++++++ .../tables/public_atd_txdot__trvl_dir_lkp.yaml | 8 ++++++++ .../public_atd_txdot__veh_body_styl_lkp.yaml | 8 ++++++++ .../tables/public_atd_txdot__veh_make_lkp.yaml | 8 ++++++++ .../tables/public_atd_txdot__veh_mod_lkp.yaml | 8 ++++++++ .../public_atd_txdot__veh_unit_desc_lkp.yaml | 8 ++++++++ .../tables/public_atd_txdot__wthr_cond_lkp.yaml | 8 ++++++++ .../tables/public_atd_txdot__y_n_lkp.yaml | 6 ++++++ 17 files changed, 136 insertions(+) diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__intrsct_relat_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__intrsct_relat_lkp.yaml index 53480aa27..7003f15b0 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__intrsct_relat_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__intrsct_relat_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__intrsct_relat_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - intrsct_relat_id + - intrsct_relat_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__light_cond_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__light_cond_lkp.yaml index 17a2cd84b..98bca6c2d 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__light_cond_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__light_cond_lkp.yaml @@ -2,6 +2,12 @@ table: name: atd_txdot__light_cond_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - light_cond_desc + - light_cond_id + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__movt_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__movt_lkp.yaml index 4df79d9f3..26823ff3b 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__movt_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__movt_lkp.yaml @@ -2,6 +2,12 @@ table: name: atd_txdot__movt_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - movement_id + - movement_desc + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__obj_struck_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__obj_struck_lkp.yaml index d250165be..c5cb7b6a9 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__obj_struck_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__obj_struck_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__obj_struck_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - obj_struck_id + - obj_struck_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__prsn_type_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__prsn_type_lkp.yaml index c0c20b444..883d3c019 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__prsn_type_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__prsn_type_lkp.yaml @@ -2,6 +2,12 @@ table: name: atd_txdot__prsn_type_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - prsn_type_desc + - prsn_type_id + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_part_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_part_lkp.yaml index dc77fa48a..66067aec7 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_part_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_part_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__road_part_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - road_part_id + - road_part_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_type_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_type_lkp.yaml index 57ed6589f..de9b665ad 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_type_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_type_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__road_type_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - road_type_id + - road_type_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__rwy_sys_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__rwy_sys_lkp.yaml index 9b4fe99a2..d47c3fcb4 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__rwy_sys_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__rwy_sys_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__rwy_sys_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - rwy_sys_id + - rwy_sys_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__street_sfx_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__street_sfx_lkp.yaml index de90e628e..ce00f43e6 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__street_sfx_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__street_sfx_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__street_sfx_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - street_sfx_id + - street_sfx_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: @@ -10,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: readonly + permission: + columns: + - street_sfx_id + - street_sfx_desc + - eff_beg_date + - eff_end_date + filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__traffic_cntl_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__traffic_cntl_lkp.yaml index 6e7b4d443..e067cceae 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__traffic_cntl_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__traffic_cntl_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__traffic_cntl_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - traffic_cntl_id + - traffic_cntl_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__trvl_dir_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__trvl_dir_lkp.yaml index 6b8a1057b..81a1964c2 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__trvl_dir_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__trvl_dir_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__trvl_dir_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - trvl_dir_id + - trvl_dir_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_body_styl_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_body_styl_lkp.yaml index aa9f26e12..8f47113d0 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_body_styl_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_body_styl_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__veh_body_styl_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - veh_body_styl_id + - veh_body_styl_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_make_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_make_lkp.yaml index af5608dea..e497a61fa 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_make_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_make_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__veh_make_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - veh_make_id + - veh_make_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_mod_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_mod_lkp.yaml index 515ffa928..2d00deaa8 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_mod_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_mod_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__veh_mod_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - veh_mod_id + - veh_mod_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_unit_desc_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_unit_desc_lkp.yaml index 8fd30b305..bb8d7b2dc 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_unit_desc_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_unit_desc_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__veh_unit_desc_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - veh_unit_desc_id + - veh_unit_desc_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__wthr_cond_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__wthr_cond_lkp.yaml index 2fccbee02..a349a56df 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__wthr_cond_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__wthr_cond_lkp.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot__wthr_cond_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - wthr_cond_id + - wthr_cond_desc + - eff_beg_date + - eff_end_date + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__y_n_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__y_n_lkp.yaml index 15a804beb..1bef62de4 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__y_n_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__y_n_lkp.yaml @@ -2,6 +2,12 @@ table: name: atd_txdot__y_n_lkp schema: public select_permissions: + - role: vz-admin + permission: + columns: + - y_n_id + - y_n_desc + filter: {} - role: editor permission: columns: From f749b498d10e698c8398f1aa8d9fa0b558322d86 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 14:37:38 -0600 Subject: [PATCH 03/35] Add vz-admin to tables through atd_txdot_locations --- .../tables/public_atd_txdot_change_log.yaml | 12 + .../public_atd_txdot_change_status.yaml | 9 + .../tables/public_atd_txdot_changes.yaml | 15 + .../tables/public_atd_txdot_changes_view.yaml | 14 + .../tables/public_atd_txdot_charges.yaml | 43 ++ .../public_atd_txdot_crash_locations.yaml | 35 + ...lic_atd_txdot_crash_locations_ranking.yaml | 8 + .../tables/public_atd_txdot_crash_status.yaml | 28 + .../tables/public_atd_txdot_crashes.yaml | 691 +++++++++++++++++- .../tables/public_atd_txdot_geocoders.yaml | 16 +- .../tables/public_atd_txdot_locations.yaml | 37 +- 11 files changed, 865 insertions(+), 43 deletions(-) diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_log.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_log.yaml index bb4fa2e98..f28326d9a 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_log.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_log.yaml @@ -2,6 +2,18 @@ table: name: atd_txdot_change_log schema: public select_permissions: + - role: vz-admin + permission: + columns: + - change_log_id + - id + - record_crash_id + - record_id + - record_json + - record_type + - update_timestamp + - updated_by + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_status.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_status.yaml index 87610868a..fcce73293 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_status.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_status.yaml @@ -2,6 +2,15 @@ table: name: atd_txdot_change_status schema: public select_permissions: + - role: vz-admin + permission: + columns: + - is_retired + - last_update + - change_status_id + - description_long + - description + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes.yaml index 0d20364fa..ab3da15f0 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes.yaml @@ -12,6 +12,21 @@ object_relationships: name: atd_txdot_change_status schema: public select_permissions: + - role: vz-admin + permission: + columns: + - change_id + - record_id + - record_type + - record_json + - update_timestamp + - created_timestamp + - updated_by + - status_id + - affected_columns + - crash_date + - record_uqid + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes_view.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes_view.yaml index a191015f3..72c0d24d9 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes_view.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes_view.yaml @@ -2,6 +2,20 @@ table: name: atd_txdot_changes_view schema: public select_permissions: + - role: vz-admin + permission: + columns: + - record_id + - change_id + - record_json + - created_timestamp + - status_id + - crash_fatal_flag + - sus_serious_injury_cnt + - status_description + - crash_date + filter: {} + allow_aggregations: true - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_charges.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_charges.yaml index e9c6bd6d0..d6dc82ff5 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_charges.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_charges.yaml @@ -2,6 +2,20 @@ table: name: atd_txdot_charges schema: public insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - is_retired + - charge_cat_id + - crash_id + - prsn_nbr + - charge_id + - unit_nbr + - charge + - last_update + - citation_nbr + - updated_by - role: editor permission: check: {} @@ -17,6 +31,20 @@ insert_permissions: - citation_nbr - updated_by select_permissions: + - role: vz-admin + permission: + columns: + - charge_id + - crash_id + - unit_nbr + - prsn_nbr + - charge_cat_id + - charge + - citation_nbr + - last_update + - updated_by + - is_retired + filter: {} - role: editor permission: columns: @@ -46,6 +74,21 @@ select_permissions: - updated_by filter: {} update_permissions: + - role: vz-admin + permission: + columns: + - is_retired + - charge_cat_id + - crash_id + - prsn_nbr + - charge_id + - unit_nbr + - charge + - last_update + - citation_nbr + - updated_by + filter: {} + check: null - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations.yaml index 2754b07c9..af0f9c4b8 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations.yaml @@ -12,6 +12,17 @@ array_relationships: name: atd_txdot_crashes schema: public insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - crash_location_id + - crash_id + - location_id + - metadata + - comments + - last_update + - is_retired - role: editor permission: check: {} @@ -24,6 +35,18 @@ insert_permissions: - last_update - is_retired select_permissions: + - role: vz-admin + permission: + columns: + - comments + - crash_id + - is_retired + - last_update + - location_id + - metadata + - crash_location_id + filter: {} + allow_aggregations: true - role: editor permission: columns: @@ -49,6 +72,18 @@ select_permissions: filter: {} allow_aggregations: true update_permissions: + - role: vz-admin + permission: + columns: + - is_retired + - last_update + - crash_id + - crash_location_id + - metadata + - comments + - location_id + filter: {} + check: null - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations_ranking.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations_ranking.yaml index 9f9afbe8d..c6b0f5d68 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations_ranking.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations_ranking.yaml @@ -2,6 +2,14 @@ table: name: atd_txdot_crash_locations_ranking schema: public select_permissions: + - role: vz-admin + permission: + columns: + - apd_confirmed_death_count + - crashes + - serious_injry_cnt + - location_id + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_status.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_status.yaml index cba771b3b..f9d0998b7 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_status.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_status.yaml @@ -2,6 +2,15 @@ table: name: atd_txdot_crash_status schema: public insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - is_retired + - last_update + - crash_status_id + - description_long + - description - role: editor permission: check: {} @@ -12,6 +21,15 @@ insert_permissions: - description_long - description select_permissions: + - role: vz-admin + permission: + columns: + - is_retired + - last_update + - crash_status_id + - description_long + - description + filter: {} - role: editor permission: columns: @@ -31,6 +49,16 @@ select_permissions: - description filter: {} update_permissions: + - role: vz-admin + permission: + columns: + - is_retired + - last_update + - crash_status_id + - description_long + - description + filter: {} + check: null - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crashes.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crashes.yaml index 4a052015e..efdf2edce 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crashes.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crashes.yaml @@ -116,7 +116,233 @@ array_relationships: remote_table: name: atd_txdot_units schema: public -insert_permissions: +insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - active_school_zone_fl + - address_confirmed_primary + - address_confirmed_secondary + - adt_adj_curnt_amt + - adt_curnt_amt + - adt_curnt_year + - amend_supp_fl + - apd_confirmed_death_count + - apd_confirmed_fatality + - apd_human_update + - approach_width + - approval_date + - approved_by + - at_intrsct_fl + - atd_fatality_count + - atd_mode_category_metadata + - austin_full_purpose + - base_type_id + - bridge_detail_id + - bridge_dir_of_traffic_id + - bridge_ir_struct_func_id + - bridge_loading_in_1000_lbs + - bridge_loading_type_id + - bridge_median_id + - bridge_rte_struct_func_id + - bridge_srvc_type_on_id + - bridge_srvc_type_under_id + - case_id + - cd_degr + - changes_approved_date + - city_id + - cmv_involv_fl + - cnty_id + - control + - control_2 + - cr3_file_metadata + - cr3_ocr_extraction_date + - cr3_stored_flag + - crash_date + - crash_fatal_fl + - crash_id + - crash_sev_id + - crash_speed_limit + - crash_time + - crossingnumber + - culvert_type_id + - curb_type_left_id + - curb_type_right_id + - curve_lngth + - curve_type_id + - day_of_week + - dd_degr + - death_cnt + - deck_width + - delta_left_right_id + - dfo + - entr_road_id + - est_comp_cost + - est_comp_cost_crash_based + - est_econ_cost + - feature_crossed + - fhe_collsn_id + - func_sys_id + - geocode_date + - geocode_match_metadata + - geocode_match_quality + - geocode_provider + - geocode_status + - geocoded + - harm_evnt_id + - hp_median_width + - hp_shldr_left + - hp_shldr_right + - hwy_dsgn_hrt_id + - hwy_dsgn_lane_id + - hwy_nbr + - hwy_nbr_2 + - hwy_sfx + - hwy_sfx_2 + - hwy_sys + - hwy_sys_2 + - i_r_min_vert_clear + - id_number + - imported_at + - intrsct_relat_id + - investigat_agency_id + - investigat_area_id + - investigat_arrv_date + - investigat_arrv_time + - investigat_comp_fl + - investigat_da_id + - investigat_date_rwy_clrd + - investigat_date_scn_clrd + - investigat_district_id + - investigat_notify_date + - investigat_notify_meth + - investigat_notify_time + - investigat_region_id + - investigat_service_id + - investigat_time_rwy_clrd + - investigat_time_scn_clrd + - investigator_name + - investigator_narrative + - investigator_narrative_ocr + - is_retired + - last_update + - latitude + - latitude_geocoded + - latitude_primary + - law_enforcement_num + - light_cond_id + - local_use + - located_fl + - location_id + - longitude + - longitude_geocoded + - longitude_primary + - median_type_id + - median_width + - medical_advisory_fl + - milepoint + - milepoint_2 + - mpo_id + - nbr_of_lane + - non_injry_cnt + - nonincap_injry_cnt + - obj_struck_id + - onsys_fl + - ori_number + - original_city_id + - othr_factr_id + - pct_combo_trk_adt + - pct_single_trk_adt + - phys_featr_1_id + - phys_featr_2_id + - pop_group_id + - poscrossing_id + - position + - poss_injry_cnt + - private_dr_fl + - qa_status + - ref_mark_displ + - ref_mark_nbr + - report_date + - road_algn_id + - road_cls_id + - road_constr_zone_fl + - road_constr_zone_wrkr_fl + - road_part_adj_id + - road_relat_id + - road_type_id + - roadbed_width + - roadway_width + - row_width_usual + - rpt_block_num + - rpt_city_id + - rpt_cris_cnty_id + - rpt_crossingnumber + - rpt_dir_traffic + - rpt_hwy_num + - rpt_hwy_sfx + - rpt_latitude + - rpt_longitude + - rpt_outside_city_limit_fl + - rpt_rdwy_sys_id + - rpt_ref_mark_dir + - rpt_ref_mark_dist_uom + - rpt_ref_mark_nbr + - rpt_ref_mark_offset_amt + - rpt_road_part_id + - rpt_sec_block_num + - rpt_sec_hwy_num + - rpt_sec_hwy_sfx + - rpt_sec_rdwy_sys_id + - rpt_sec_road_part_id + - rpt_sec_speed_limit + - rpt_sec_street_desc + - rpt_sec_street_name + - rpt_sec_street_pfx + - rpt_sec_street_sfx + - rpt_street_desc + - rpt_street_name + - rpt_street_pfx + - rpt_street_sfx + - rr_relat_fl + - rrco + - rural_fl + - rural_urban_type_id + - schl_bus_fl + - secondary_crash_fl + - section + - section_2 + - shldr_type_left_id + - shldr_type_right_id + - shldr_use_left_id + - shldr_use_right_id + - shldr_width_left + - shldr_width_right + - speed_mgmt_points + - standstop + - street_name + - street_name_2 + - street_nbr + - street_nbr_2 + - structure_number + - surf_cond_id + - surf_type_id + - surf_width + - sus_serious_injry_cnt + - temp_record + - thousand_damage_fl + - toll_road_fl + - tot_injry_cnt + - traffic_cntl_id + - trk_aadt_pct + - txdot_rptable_fl + - unkn_injry_cnt + - updated_by + - wdcode_id + - wthr_cond_id + - yield + comment: "" - role: editor permission: check: {} @@ -344,7 +570,7 @@ insert_permissions: - yield comment: "" select_permissions: - - role: editor + - role: vz-admin permission: columns: - active_school_zone_fl @@ -574,7 +800,7 @@ select_permissions: - yield filter: {} allow_aggregations: true - - role: readonly + - role: editor permission: columns: - active_school_zone_fl @@ -804,7 +1030,464 @@ select_permissions: - yield filter: {} allow_aggregations: true -update_permissions: + - role: readonly + permission: + columns: + - active_school_zone_fl + - address_confirmed_primary + - address_confirmed_secondary + - adt_adj_curnt_amt + - adt_curnt_amt + - adt_curnt_year + - amend_supp_fl + - apd_confirmed_death_count + - apd_confirmed_fatality + - apd_human_update + - approach_width + - approval_date + - approved_by + - at_intrsct_fl + - atd_fatality_count + - atd_mode_category_metadata + - austin_full_purpose + - base_type_id + - bridge_detail_id + - bridge_dir_of_traffic_id + - bridge_ir_struct_func_id + - bridge_loading_in_1000_lbs + - bridge_loading_type_id + - bridge_median_id + - bridge_rte_struct_func_id + - bridge_srvc_type_on_id + - bridge_srvc_type_under_id + - case_id + - cd_degr + - changes_approved_date + - city_id + - cmv_involv_fl + - cnty_id + - control + - control_2 + - council_district + - cr3_file_metadata + - cr3_ocr_extraction_date + - cr3_stored_flag + - crash_date + - crash_fatal_fl + - crash_id + - crash_sev_id + - crash_speed_limit + - crash_time + - crossingnumber + - culvert_type_id + - curb_type_left_id + - curb_type_right_id + - curve_lngth + - curve_type_id + - day_of_week + - dd_degr + - death_cnt + - deck_width + - delta_left_right_id + - dfo + - entr_road_id + - est_comp_cost + - est_comp_cost_crash_based + - est_econ_cost + - feature_crossed + - fhe_collsn_id + - func_sys_id + - geocode_date + - geocode_match_metadata + - geocode_match_quality + - geocode_provider + - geocode_status + - geocoded + - harm_evnt_id + - hp_median_width + - hp_shldr_left + - hp_shldr_right + - hwy_dsgn_hrt_id + - hwy_dsgn_lane_id + - hwy_nbr + - hwy_nbr_2 + - hwy_sfx + - hwy_sfx_2 + - hwy_sys + - hwy_sys_2 + - i_r_min_vert_clear + - id_number + - imported_at + - in_austin_full_purpose + - intrsct_relat_id + - investigat_agency_id + - investigat_area_id + - investigat_arrv_date + - investigat_arrv_time + - investigat_comp_fl + - investigat_da_id + - investigat_date_rwy_clrd + - investigat_date_scn_clrd + - investigat_district_id + - investigat_notify_date + - investigat_notify_meth + - investigat_notify_time + - investigat_region_id + - investigat_service_id + - investigat_time_rwy_clrd + - investigat_time_scn_clrd + - investigator_name + - investigator_narrative + - investigator_narrative_ocr + - is_retired + - last_update + - latitude + - latitude_geocoded + - latitude_primary + - law_enforcement_num + - light_cond_id + - local_use + - located_fl + - location_id + - longitude + - longitude_geocoded + - longitude_primary + - median_type_id + - median_width + - medical_advisory_fl + - milepoint + - milepoint_2 + - mpo_id + - nbr_of_lane + - near_trauma_center_distance + - near_trauma_center_id + - non_injry_cnt + - nonincap_injry_cnt + - obj_struck_id + - onsys_fl + - ori_number + - original_city_id + - othr_factr_id + - pct_combo_trk_adt + - pct_single_trk_adt + - phys_featr_1_id + - phys_featr_2_id + - pop_group_id + - poscrossing_id + - position + - poss_injry_cnt + - private_dr_fl + - qa_status + - ref_mark_displ + - ref_mark_nbr + - report_date + - road_algn_id + - road_cls_id + - road_constr_zone_fl + - road_constr_zone_wrkr_fl + - road_part_adj_id + - road_relat_id + - road_type_id + - roadbed_width + - roadway_width + - row_width_usual + - rpt_block_num + - rpt_city_id + - rpt_cris_cnty_id + - rpt_crossingnumber + - rpt_dir_traffic + - rpt_hwy_num + - rpt_hwy_sfx + - rpt_latitude + - rpt_longitude + - rpt_outside_city_limit_fl + - rpt_rdwy_sys_id + - rpt_ref_mark_dir + - rpt_ref_mark_dist_uom + - rpt_ref_mark_nbr + - rpt_ref_mark_offset_amt + - rpt_road_part_id + - rpt_sec_block_num + - rpt_sec_hwy_num + - rpt_sec_hwy_sfx + - rpt_sec_rdwy_sys_id + - rpt_sec_road_part_id + - rpt_sec_speed_limit + - rpt_sec_street_desc + - rpt_sec_street_name + - rpt_sec_street_pfx + - rpt_sec_street_sfx + - rpt_street_desc + - rpt_street_name + - rpt_street_pfx + - rpt_street_sfx + - rr_relat_fl + - rrco + - rural_fl + - rural_urban_type_id + - schl_bus_fl + - secondary_crash_fl + - section + - section_2 + - shldr_type_left_id + - shldr_type_right_id + - shldr_use_left_id + - shldr_use_right_id + - shldr_width_left + - shldr_width_right + - speed_mgmt_points + - standstop + - street_name + - street_name_2 + - street_nbr + - street_nbr_2 + - structure_number + - surf_cond_id + - surf_type_id + - surf_width + - sus_serious_injry_cnt + - temp_record + - thousand_damage_fl + - toll_road_fl + - tot_injry_cnt + - traffic_cntl_id + - trk_aadt_pct + - txdot_rptable_fl + - unkn_injry_cnt + - updated_by + - wdcode_id + - wthr_cond_id + - yield + filter: {} + allow_aggregations: true +update_permissions: + - role: vz-admin + permission: + columns: + - active_school_zone_fl + - address_confirmed_primary + - address_confirmed_secondary + - adt_adj_curnt_amt + - adt_curnt_amt + - adt_curnt_year + - amend_supp_fl + - apd_confirmed_death_count + - apd_confirmed_fatality + - apd_human_update + - approach_width + - approval_date + - approved_by + - at_intrsct_fl + - atd_fatality_count + - atd_mode_category_metadata + - austin_full_purpose + - base_type_id + - bridge_detail_id + - bridge_dir_of_traffic_id + - bridge_ir_struct_func_id + - bridge_loading_in_1000_lbs + - bridge_loading_type_id + - bridge_median_id + - bridge_rte_struct_func_id + - bridge_srvc_type_on_id + - bridge_srvc_type_under_id + - case_id + - cd_degr + - changes_approved_date + - city_id + - cmv_involv_fl + - cnty_id + - control + - control_2 + - cr3_file_metadata + - cr3_ocr_extraction_date + - cr3_stored_flag + - crash_date + - crash_fatal_fl + - crash_id + - crash_sev_id + - crash_speed_limit + - crash_time + - crossingnumber + - culvert_type_id + - curb_type_left_id + - curb_type_right_id + - curve_lngth + - curve_type_id + - day_of_week + - dd_degr + - death_cnt + - deck_width + - delta_left_right_id + - dfo + - entr_road_id + - est_comp_cost + - est_comp_cost_crash_based + - est_econ_cost + - feature_crossed + - fhe_collsn_id + - func_sys_id + - geocode_date + - geocode_match_metadata + - geocode_match_quality + - geocode_provider + - geocode_status + - geocoded + - harm_evnt_id + - hp_median_width + - hp_shldr_left + - hp_shldr_right + - hwy_dsgn_hrt_id + - hwy_dsgn_lane_id + - hwy_nbr + - hwy_nbr_2 + - hwy_sfx + - hwy_sfx_2 + - hwy_sys + - hwy_sys_2 + - i_r_min_vert_clear + - id_number + - imported_at + - intrsct_relat_id + - investigat_agency_id + - investigat_area_id + - investigat_arrv_date + - investigat_arrv_time + - investigat_comp_fl + - investigat_da_id + - investigat_date_rwy_clrd + - investigat_date_scn_clrd + - investigat_district_id + - investigat_notify_date + - investigat_notify_meth + - investigat_notify_time + - investigat_region_id + - investigat_service_id + - investigat_time_rwy_clrd + - investigat_time_scn_clrd + - investigator_name + - investigator_narrative + - investigator_narrative_ocr + - is_retired + - last_update + - latitude + - latitude_geocoded + - latitude_primary + - law_enforcement_num + - light_cond_id + - local_use + - located_fl + - location_id + - longitude + - longitude_geocoded + - longitude_primary + - median_type_id + - median_width + - medical_advisory_fl + - milepoint + - milepoint_2 + - mpo_id + - nbr_of_lane + - non_injry_cnt + - nonincap_injry_cnt + - obj_struck_id + - onsys_fl + - ori_number + - original_city_id + - othr_factr_id + - pct_combo_trk_adt + - pct_single_trk_adt + - phys_featr_1_id + - phys_featr_2_id + - pop_group_id + - poscrossing_id + - position + - poss_injry_cnt + - private_dr_fl + - qa_status + - ref_mark_displ + - ref_mark_nbr + - report_date + - road_algn_id + - road_cls_id + - road_constr_zone_fl + - road_constr_zone_wrkr_fl + - road_part_adj_id + - road_relat_id + - road_type_id + - roadbed_width + - roadway_width + - row_width_usual + - rpt_block_num + - rpt_city_id + - rpt_cris_cnty_id + - rpt_crossingnumber + - rpt_dir_traffic + - rpt_hwy_num + - rpt_hwy_sfx + - rpt_latitude + - rpt_longitude + - rpt_outside_city_limit_fl + - rpt_rdwy_sys_id + - rpt_ref_mark_dir + - rpt_ref_mark_dist_uom + - rpt_ref_mark_nbr + - rpt_ref_mark_offset_amt + - rpt_road_part_id + - rpt_sec_block_num + - rpt_sec_hwy_num + - rpt_sec_hwy_sfx + - rpt_sec_rdwy_sys_id + - rpt_sec_road_part_id + - rpt_sec_speed_limit + - rpt_sec_street_desc + - rpt_sec_street_name + - rpt_sec_street_pfx + - rpt_sec_street_sfx + - rpt_street_desc + - rpt_street_name + - rpt_street_pfx + - rpt_street_sfx + - rr_relat_fl + - rrco + - rural_fl + - rural_urban_type_id + - schl_bus_fl + - secondary_crash_fl + - section + - section_2 + - shldr_type_left_id + - shldr_type_right_id + - shldr_use_left_id + - shldr_use_right_id + - shldr_width_left + - shldr_width_right + - speed_mgmt_points + - standstop + - street_name + - street_name_2 + - street_nbr + - street_nbr_2 + - structure_number + - surf_cond_id + - surf_type_id + - surf_width + - sus_serious_injry_cnt + - temp_record + - thousand_damage_fl + - toll_road_fl + - tot_injry_cnt + - traffic_cntl_id + - trk_aadt_pct + - txdot_rptable_fl + - unkn_injry_cnt + - updated_by + - wdcode_id + - wthr_cond_id + - yield + filter: {} + check: null + comment: "" - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_geocoders.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_geocoders.yaml index a0400d4f5..c8b92f9a7 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_geocoders.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_geocoders.yaml @@ -1,35 +1,25 @@ table: name: atd_txdot_geocoders schema: public -insert_permissions: - - role: editor - permission: - check: {} - columns: - - geocoder_id - - description - - name select_permissions: - - role: editor + - role: vz-admin permission: columns: - geocoder_id - description - name filter: {} - - role: readonly + - role: editor permission: columns: - geocoder_id - description - name filter: {} -update_permissions: - - role: editor + - role: readonly permission: columns: - geocoder_id - description - name filter: {} - check: null diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_locations.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_locations.yaml index 0867e23b2..a6abe76dc 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_locations.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_locations.yaml @@ -30,28 +30,8 @@ array_relationships: remote_table: name: view_location_crashes_by_veh_body_style schema: public -insert_permissions: - - role: editor - permission: - check: {} - columns: - - address - - description - - geometry - - is_retired - - is_studylocation - - last_update - - latitude - - location_group - - location_id - - longitude - - metadata - - priority_level - - scale_factor - - shape - - unique_id select_permissions: - - role: editor + - role: vz-admin permission: columns: - address @@ -78,7 +58,7 @@ select_permissions: - street_level filter: {} allow_aggregations: true - - role: readonly + - role: editor permission: columns: - address @@ -105,18 +85,23 @@ select_permissions: - street_level filter: {} allow_aggregations: true -update_permissions: - - role: editor + - role: readonly permission: columns: - address - asmp_street_level + - council_district - description - geometry - is_retired - is_studylocation - last_update - latitude + - level_1 + - level_2 + - level_3 + - level_4 + - level_5 - location_group - location_id - longitude @@ -124,6 +109,6 @@ update_permissions: - priority_level - scale_factor - shape - - unique_id + - street_level filter: {} - check: null + allow_aggregations: true From aa61639c79f56290ba523f3bba2b2f724e2a7184 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 15:04:58 -0600 Subject: [PATCH 04/35] Add vz-admin to tables through crash_notes --- .../tables/public_atd_txdot_person.yaml | 130 +++++++ .../public_atd_txdot_primaryperson.yaml | 142 ++++++- .../tables/public_atd_txdot_streets.yaml | 92 ++--- .../tables/public_atd_txdot_units.yaml | 348 ++++++++++++++++++ ...lic_cr3_nonproper_crashes_on_mainlane.yaml | 219 +++++++++++ .../default/tables/public_crash_notes.yaml | 33 +- 6 files changed, 886 insertions(+), 78 deletions(-) diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml index 825a0a5ec..f008d77de 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml @@ -70,6 +70,50 @@ object_relationships: name: atd_txdot_units schema: public insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - crash_id + - death_cnt + - is_retired + - last_update + - non_injry_cnt + - nonincap_injry_cnt + - peh_fl + - person_id + - poss_injry_cnt + - prsn_age + - prsn_airbag_id + - prsn_alc_rslt_id + - prsn_alc_spec_type_id + - prsn_bac_test_rslt + - prsn_death_date + - prsn_death_time + - prsn_drg_rslt_id + - prsn_drg_spec_type_id + - prsn_ejct_id + - prsn_ethnicity_id + - prsn_first_name + - prsn_gndr_id + - prsn_helmet_id + - prsn_injry_sev_id + - prsn_last_name + - prsn_mid_name + - prsn_name_honorific + - prsn_name_sfx + - prsn_nbr + - prsn_occpnt_pos_id + - prsn_rest_id + - prsn_sol_fl + - prsn_taken_by + - prsn_taken_to + - prsn_type_id + - sus_serious_injry_cnt + - tot_injry_cnt + - unit_nbr + - unkn_injry_cnt + - updated_by - role: editor permission: check: {} @@ -115,6 +159,47 @@ insert_permissions: - unkn_injry_cnt - updated_by select_permissions: + - role: vz-admin + permission: + columns: + - crash_id + - death_cnt + - is_retired + - last_update + - non_injry_cnt + - nonincap_injry_cnt + - peh_fl + - person_id + - poss_injry_cnt + - prsn_age + - prsn_airbag_id + - prsn_alc_rslt_id + - prsn_alc_spec_type_id + - prsn_bac_test_rslt + - prsn_death_date + - prsn_death_time + - prsn_drg_rslt_id + - prsn_drg_spec_type_id + - prsn_ejct_id + - prsn_ethnicity_id + - prsn_gndr_id + - prsn_helmet_id + - prsn_injry_sev_id + - prsn_nbr + - prsn_occpnt_pos_id + - prsn_rest_id + - prsn_sol_fl + - prsn_taken_by + - prsn_taken_to + - prsn_type_id + - sus_serious_injry_cnt + - tot_injry_cnt + - unit_nbr + - unkn_injry_cnt + - updated_by + - years_of_life_lost + filter: {} + allow_aggregations: true - role: editor permission: columns: @@ -198,6 +283,51 @@ select_permissions: filter: {} allow_aggregations: true update_permissions: + - role: vz-admin + permission: + columns: + - crash_id + - death_cnt + - is_retired + - last_update + - non_injry_cnt + - nonincap_injry_cnt + - peh_fl + - person_id + - poss_injry_cnt + - prsn_age + - prsn_airbag_id + - prsn_alc_rslt_id + - prsn_alc_spec_type_id + - prsn_bac_test_rslt + - prsn_death_date + - prsn_death_time + - prsn_drg_rslt_id + - prsn_drg_spec_type_id + - prsn_ejct_id + - prsn_ethnicity_id + - prsn_first_name + - prsn_gndr_id + - prsn_helmet_id + - prsn_injry_sev_id + - prsn_last_name + - prsn_mid_name + - prsn_name_honorific + - prsn_name_sfx + - prsn_nbr + - prsn_occpnt_pos_id + - prsn_rest_id + - prsn_sol_fl + - prsn_taken_by + - prsn_taken_to + - prsn_type_id + - sus_serious_injry_cnt + - tot_injry_cnt + - unit_nbr + - unkn_injry_cnt + - updated_by + filter: {} + check: null - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml index 1effa6645..3defe88c6 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml @@ -76,6 +76,52 @@ object_relationships: name: atd_txdot_units schema: public insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - crash_id + - death_cnt + - drvr_city_name + - drvr_drg_cat_1_id + - drvr_lic_cls_id + - drvr_lic_type_id + - drvr_state_id + - drvr_zip + - is_retired + - last_update + - non_injry_cnt + - nonincap_injry_cnt + - peh_fl + - poss_injry_cnt + - primaryperson_id + - prsn_age + - prsn_airbag_id + - prsn_alc_rslt_id + - prsn_alc_spec_type_id + - prsn_bac_test_rslt + - prsn_death_date + - prsn_death_time + - prsn_drg_rslt_id + - prsn_drg_spec_type_id + - prsn_ejct_id + - prsn_ethnicity_id + - prsn_gndr_id + - prsn_helmet_id + - prsn_injry_sev_id + - prsn_name_honorific + - prsn_nbr + - prsn_occpnt_pos_id + - prsn_rest_id + - prsn_sol_fl + - prsn_taken_by + - prsn_taken_to + - prsn_type_id + - sus_serious_injry_cnt + - tot_injry_cnt + - unit_nbr + - unkn_injry_cnt + - updated_by - role: editor permission: check: {} @@ -123,6 +169,53 @@ insert_permissions: - unkn_injry_cnt - updated_by select_permissions: + - role: vz-admin + permission: + columns: + - crash_id + - death_cnt + - drvr_city_name + - drvr_drg_cat_1_id + - drvr_lic_cls_id + - drvr_lic_type_id + - drvr_state_id + - drvr_zip + - is_retired + - last_update + - non_injry_cnt + - nonincap_injry_cnt + - peh_fl + - poss_injry_cnt + - primaryperson_id + - prsn_age + - prsn_airbag_id + - prsn_alc_rslt_id + - prsn_alc_spec_type_id + - prsn_bac_test_rslt + - prsn_death_date + - prsn_death_time + - prsn_drg_rslt_id + - prsn_drg_spec_type_id + - prsn_ejct_id + - prsn_ethnicity_id + - prsn_gndr_id + - prsn_helmet_id + - prsn_injry_sev_id + - prsn_nbr + - prsn_occpnt_pos_id + - prsn_rest_id + - prsn_sol_fl + - prsn_taken_by + - prsn_taken_to + - prsn_type_id + - sus_serious_injry_cnt + - tot_injry_cnt + - unit_nbr + - unkn_injry_cnt + - updated_by + - years_of_life_lost + filter: {} + allow_aggregations: true - role: editor permission: columns: @@ -217,7 +310,54 @@ select_permissions: - years_of_life_lost filter: {} allow_aggregations: true -update_permissions: +update_permissions: + - role: vz-admin + permission: + columns: + - crash_id + - death_cnt + - drvr_city_name + - drvr_drg_cat_1_id + - drvr_lic_cls_id + - drvr_lic_type_id + - drvr_state_id + - drvr_zip + - is_retired + - last_update + - non_injry_cnt + - nonincap_injry_cnt + - peh_fl + - poss_injry_cnt + - primaryperson_id + - prsn_age + - prsn_airbag_id + - prsn_alc_rslt_id + - prsn_alc_spec_type_id + - prsn_bac_test_rslt + - prsn_death_date + - prsn_death_time + - prsn_drg_rslt_id + - prsn_drg_spec_type_id + - prsn_ejct_id + - prsn_ethnicity_id + - prsn_gndr_id + - prsn_helmet_id + - prsn_injry_sev_id + - prsn_name_honorific + - prsn_nbr + - prsn_occpnt_pos_id + - prsn_rest_id + - prsn_sol_fl + - prsn_taken_by + - prsn_taken_to + - prsn_type_id + - sus_serious_injry_cnt + - tot_injry_cnt + - unit_nbr + - unkn_injry_cnt + - updated_by + filter: {} + check: null - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_streets.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_streets.yaml index 9811b65cd..bea2fcbe7 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_streets.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_streets.yaml @@ -1,46 +1,8 @@ table: name: atd_txdot_streets schema: public -insert_permissions: - - role: editor - permission: - check: {} - columns: - - shape - - built_status - - cad_id - - elevation_from - - elevation_to - - left_block_from - - left_block_to - - left_from_address - - left_to_address - - posted_speed_limit - - right_block_from - - right_block_to - - right_from_address - - right_to_address - - road_class - - segment_id - - speed_limit - - street_place_id - - street_id - - miles - - seconds - - shape_length - - created_date - - full_street_name - - modified_date - - created_by - - modified_by - - one_way - - prefix_direction - - prefix_type - - street_name - - street_type - - suffix_direction select_permissions: - - role: editor + - role: vz-admin permission: columns: - street_id @@ -77,45 +39,44 @@ select_permissions: - shape_length - shape filter: {} - - role: readonly + - role: editor permission: columns: - - shape - - built_status - - cad_id - - elevation_from - - elevation_to - - left_block_from - - left_block_to + - street_id + - posted_speed_limit + - segment_id + - prefix_direction + - prefix_type + - street_name + - street_type + - suffix_direction - left_from_address - left_to_address - - posted_speed_limit - - right_block_from - - right_block_to - right_from_address - right_to_address + - left_block_from + - left_block_to + - right_block_from + - right_block_to + - full_street_name - road_class - - segment_id - speed_limit + - elevation_from + - elevation_to + - one_way + - cad_id - street_place_id - - street_id - - miles - - seconds - - shape_length - created_date - - full_street_name - - modified_date - created_by - modified_by - - one_way - - prefix_direction - - prefix_type - - street_name - - street_type - - suffix_direction + - modified_date + - miles + - seconds + - built_status + - shape_length + - shape filter: {} -update_permissions: - - role: editor + - role: readonly permission: columns: - shape @@ -152,4 +113,3 @@ update_permissions: - street_type - suffix_direction filter: {} - check: null diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_units.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_units.yaml index 8e349d40f..19f4e949f 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_units.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_units.yaml @@ -75,6 +75,115 @@ object_relationships: name: atd_txdot__veh_unit_desc_lkp schema: public insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - cmv_bus_type_id + - cmv_cargo_body_id + - cmv_carrier_city_name + - cmv_carrier_corp_name + - cmv_carrier_id_nbr + - cmv_carrier_id_type_id + - cmv_carrier_po_box + - cmv_carrier_state_id + - cmv_carrier_street_name + - cmv_carrier_street_nbr + - cmv_carrier_street_pfx + - cmv_carrier_street_sfx + - cmv_carrier_zip + - cmv_disabling_damage_fl + - cmv_evnt1_id + - cmv_evnt2_id + - cmv_evnt3_id + - cmv_evnt4_id + - cmv_fiveton_fl + - cmv_gvwr + - cmv_hazmat_fl + - cmv_hazmat_rel_fl + - cmv_nine_plus_pass_fl + - cmv_rgvw + - cmv_road_acc_id + - cmv_tot_axle + - cmv_tot_tire + - cmv_trlr1_disabling_dmag_id + - cmv_trlr2_disabling_dmag_id + - cmv_veh_oper_id + - cmv_veh_type_id + - contrib_factr_1_id + - contrib_factr_2_id + - contrib_factr_3_id + - contrib_factr_p1_id + - contrib_factr_p2_id + - crash_id + - death_cnt + - emer_respndr_fl + - fin_resp_name + - fin_resp_phone_nbr + - fin_resp_policy_nbr + - fin_resp_proof_id + - fin_resp_type_id + - first_harm_evt_inv_id + - force_dir_1_id + - force_dir_2_id + - hazmat_cls_1_id + - hazmat_cls_2_id + - hazmat_idnbr_1_id + - hazmat_idnbr_2_id + - is_retired + - last_update + - non_injry_cnt + - nonincap_injry_cnt + - owner_lessee + - ownr_city_name + - ownr_name_honorific + - ownr_state_id + - ownr_zip + - poss_injry_cnt + - sus_serious_injry_cnt + - tot_injry_cnt + - travel_direction + - trlr1_gvwr + - trlr1_rgvw + - trlr1_type_id + - trlr2_gvwr + - trlr2_rgvw + - trlr2_type_id + - unit_desc_id + - unit_id + - unit_nbr + - unkn_injry_cnt + - updated_by + - veh_body_styl_id + - veh_cmv_fl + - veh_color_id + - veh_damage_description1_id + - veh_damage_description2_id + - veh_damage_direction_of_force1_id + - veh_damage_direction_of_force2_id + - veh_damage_severity1_id + - veh_damage_severity2_id + - veh_dfct_1_id + - veh_dfct_2_id + - veh_dfct_3_id + - veh_dfct_p1_id + - veh_dfct_p2_id + - veh_dmag_area_1_id + - veh_dmag_area_2_id + - veh_dmag_scl_1_id + - veh_dmag_scl_2_id + - veh_hnr_fl + - veh_inventoried_fl + - veh_lic_plate_nbr + - veh_lic_state_id + - veh_make_id + - veh_mod_id + - veh_mod_year + - veh_parked_fl + - veh_transp_dest + - veh_transp_name + - veh_trvl_dir_id + - vin - role: editor permission: check: {} @@ -185,6 +294,125 @@ insert_permissions: - veh_trvl_dir_id - vin select_permissions: + - role: vz-admin + permission: + columns: + - atd_mode_category + - autonomous_unit_id + - cmv_bus_type_id + - cmv_cargo_body_id + - cmv_carrier_city_name + - cmv_carrier_corp_name + - cmv_carrier_id_nbr + - cmv_carrier_id_type_id + - cmv_carrier_po_box + - cmv_carrier_state_id + - cmv_carrier_street_name + - cmv_carrier_street_nbr + - cmv_carrier_street_pfx + - cmv_carrier_street_sfx + - cmv_carrier_zip + - cmv_disabling_damage_fl + - cmv_evnt1_id + - cmv_evnt2_id + - cmv_evnt3_id + - cmv_evnt4_id + - cmv_fiveton_fl + - cmv_gvwr + - cmv_hazmat_fl + - cmv_hazmat_rel_fl + - cmv_nine_plus_pass_fl + - cmv_rgvw + - cmv_road_acc_id + - cmv_tot_axle + - cmv_tot_tire + - cmv_trlr1_disabling_dmag_id + - cmv_trlr2_disabling_dmag_id + - cmv_veh_oper_id + - cmv_veh_type_id + - contrib_factr_1_id + - contrib_factr_2_id + - contrib_factr_3_id + - contrib_factr_p1_id + - contrib_factr_p2_id + - crash_id + - death_cnt + - e_scooter_id + - emer_respndr_fl + - fin_resp_name + - fin_resp_phone_nbr + - fin_resp_policy_nbr + - fin_resp_proof_id + - fin_resp_type_id + - first_harm_evt_inv_id + - force_dir_1_id + - force_dir_2_id + - hazmat_cls_1_id + - hazmat_cls_2_id + - hazmat_idnbr_1_id + - hazmat_idnbr_2_id + - is_retired + - last_update + - movement_id + - non_injry_cnt + - nonincap_injry_cnt + - owner_lessee + - ownr_city_name + - ownr_mid_name + - ownr_name_honorific + - ownr_name_sfx + - ownr_state_id + - ownr_zip + - pbcat_pedalcyclist_id + - pbcat_pedestrian_id + - pedalcyclist_action_id + - pedestrian_action_id + - poss_injry_cnt + - sus_serious_injry_cnt + - tot_injry_cnt + - travel_direction + - trlr1_gvwr + - trlr1_rgvw + - trlr1_type_id + - trlr2_gvwr + - trlr2_rgvw + - trlr2_type_id + - unit_desc_id + - unit_id + - unit_nbr + - unkn_injry_cnt + - updated_by + - veh_body_styl_id + - veh_cmv_fl + - veh_color_id + - veh_damage_description1_id + - veh_damage_description2_id + - veh_damage_direction_of_force1_id + - veh_damage_direction_of_force2_id + - veh_damage_severity1_id + - veh_damage_severity2_id + - veh_dfct_1_id + - veh_dfct_2_id + - veh_dfct_3_id + - veh_dfct_p1_id + - veh_dfct_p2_id + - veh_dmag_area_1_id + - veh_dmag_area_2_id + - veh_dmag_scl_1_id + - veh_dmag_scl_2_id + - veh_hnr_fl + - veh_inventoried_fl + - veh_lic_plate_nbr + - veh_lic_state_id + - veh_make_id + - veh_mod_id + - veh_mod_year + - veh_parked_fl + - veh_transp_dest + - veh_transp_name + - veh_trvl_dir_id + - vin + filter: {} - role: editor permission: columns: @@ -414,6 +642,126 @@ select_permissions: - vin filter: {} update_permissions: + - role: vz-admin + permission: + columns: + - atd_mode_category + - autonomous_unit_id + - cmv_bus_type_id + - cmv_cargo_body_id + - cmv_carrier_city_name + - cmv_carrier_corp_name + - cmv_carrier_id_nbr + - cmv_carrier_id_type_id + - cmv_carrier_po_box + - cmv_carrier_state_id + - cmv_carrier_street_name + - cmv_carrier_street_nbr + - cmv_carrier_street_pfx + - cmv_carrier_street_sfx + - cmv_carrier_zip + - cmv_disabling_damage_fl + - cmv_evnt1_id + - cmv_evnt2_id + - cmv_evnt3_id + - cmv_evnt4_id + - cmv_fiveton_fl + - cmv_gvwr + - cmv_hazmat_fl + - cmv_hazmat_rel_fl + - cmv_nine_plus_pass_fl + - cmv_rgvw + - cmv_road_acc_id + - cmv_tot_axle + - cmv_tot_tire + - cmv_trlr1_disabling_dmag_id + - cmv_trlr2_disabling_dmag_id + - cmv_veh_oper_id + - cmv_veh_type_id + - contrib_factr_1_id + - contrib_factr_2_id + - contrib_factr_3_id + - contrib_factr_p1_id + - contrib_factr_p2_id + - crash_id + - death_cnt + - e_scooter_id + - emer_respndr_fl + - fin_resp_name + - fin_resp_phone_nbr + - fin_resp_policy_nbr + - fin_resp_proof_id + - fin_resp_type_id + - first_harm_evt_inv_id + - force_dir_1_id + - force_dir_2_id + - hazmat_cls_1_id + - hazmat_cls_2_id + - hazmat_idnbr_1_id + - hazmat_idnbr_2_id + - is_retired + - last_update + - movement_id + - non_injry_cnt + - nonincap_injry_cnt + - owner_lessee + - ownr_city_name + - ownr_mid_name + - ownr_name_honorific + - ownr_name_sfx + - ownr_state_id + - ownr_zip + - pbcat_pedalcyclist_id + - pbcat_pedestrian_id + - pedalcyclist_action_id + - pedestrian_action_id + - poss_injry_cnt + - sus_serious_injry_cnt + - tot_injry_cnt + - travel_direction + - trlr1_gvwr + - trlr1_rgvw + - trlr1_type_id + - trlr2_gvwr + - trlr2_rgvw + - trlr2_type_id + - unit_desc_id + - unit_id + - unit_nbr + - unkn_injry_cnt + - updated_by + - veh_body_styl_id + - veh_cmv_fl + - veh_color_id + - veh_damage_description1_id + - veh_damage_description2_id + - veh_damage_direction_of_force1_id + - veh_damage_direction_of_force2_id + - veh_damage_severity1_id + - veh_damage_severity2_id + - veh_dfct_1_id + - veh_dfct_2_id + - veh_dfct_3_id + - veh_dfct_p1_id + - veh_dfct_p2_id + - veh_dmag_area_1_id + - veh_dmag_area_2_id + - veh_dmag_scl_1_id + - veh_dmag_scl_2_id + - veh_hnr_fl + - veh_inventoried_fl + - veh_lic_plate_nbr + - veh_lic_state_id + - veh_make_id + - veh_mod_id + - veh_mod_year + - veh_parked_fl + - veh_transp_dest + - veh_transp_name + - veh_trvl_dir_id + - vin + filter: {} + check: null - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_cr3_nonproper_crashes_on_mainlane.yaml b/atd-vzd/metadata/databases/default/tables/public_cr3_nonproper_crashes_on_mainlane.yaml index f411dc0bd..bd0eda885 100644 --- a/atd-vzd/metadata/databases/default/tables/public_cr3_nonproper_crashes_on_mainlane.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_cr3_nonproper_crashes_on_mainlane.yaml @@ -2,6 +2,225 @@ table: name: cr3_nonproper_crashes_on_mainlane schema: public select_permissions: + - role: vz-admin + permission: + columns: + - crash_id + - crash_fatal_fl + - cmv_involv_fl + - schl_bus_fl + - rr_relat_fl + - medical_advisory_fl + - amend_supp_fl + - active_school_zone_fl + - crash_date + - crash_time + - case_id + - local_use + - rpt_cris_cnty_id + - rpt_city_id + - rpt_outside_city_limit_fl + - thousand_damage_fl + - rpt_latitude + - rpt_longitude + - rpt_rdwy_sys_id + - rpt_hwy_num + - rpt_hwy_sfx + - rpt_road_part_id + - rpt_block_num + - rpt_street_pfx + - rpt_street_name + - rpt_street_sfx + - private_dr_fl + - toll_road_fl + - crash_speed_limit + - road_constr_zone_fl + - road_constr_zone_wrkr_fl + - rpt_street_desc + - at_intrsct_fl + - rpt_sec_rdwy_sys_id + - rpt_sec_hwy_num + - rpt_sec_hwy_sfx + - rpt_sec_road_part_id + - rpt_sec_block_num + - rpt_sec_street_pfx + - rpt_sec_street_name + - rpt_sec_street_sfx + - rpt_ref_mark_offset_amt + - rpt_ref_mark_dist_uom + - rpt_ref_mark_dir + - rpt_ref_mark_nbr + - rpt_sec_street_desc + - rpt_crossingnumber + - wthr_cond_id + - light_cond_id + - entr_road_id + - road_type_id + - road_algn_id + - surf_cond_id + - traffic_cntl_id + - investigat_notify_time + - investigat_notify_meth + - investigat_arrv_time + - report_date + - investigat_comp_fl + - investigator_name + - id_number + - ori_number + - investigat_agency_id + - investigat_area_id + - investigat_district_id + - investigat_region_id + - bridge_detail_id + - harm_evnt_id + - intrsct_relat_id + - fhe_collsn_id + - obj_struck_id + - othr_factr_id + - road_part_adj_id + - road_cls_id + - road_relat_id + - phys_featr_1_id + - phys_featr_2_id + - cnty_id + - city_id + - latitude + - longitude + - hwy_sys + - hwy_nbr + - hwy_sfx + - dfo + - street_name + - street_nbr + - control + - section + - milepoint + - ref_mark_nbr + - ref_mark_displ + - hwy_sys_2 + - hwy_nbr_2 + - hwy_sfx_2 + - street_name_2 + - street_nbr_2 + - control_2 + - section_2 + - milepoint_2 + - txdot_rptable_fl + - onsys_fl + - rural_fl + - crash_sev_id + - pop_group_id + - located_fl + - day_of_week + - hwy_dsgn_lane_id + - hwy_dsgn_hrt_id + - hp_shldr_left + - hp_shldr_right + - hp_median_width + - base_type_id + - nbr_of_lane + - row_width_usual + - roadbed_width + - surf_width + - surf_type_id + - curb_type_left_id + - curb_type_right_id + - shldr_type_left_id + - shldr_width_left + - shldr_use_left_id + - shldr_type_right_id + - shldr_width_right + - shldr_use_right_id + - median_type_id + - median_width + - rural_urban_type_id + - func_sys_id + - adt_curnt_amt + - adt_curnt_year + - adt_adj_curnt_amt + - pct_single_trk_adt + - pct_combo_trk_adt + - trk_aadt_pct + - curve_type_id + - curve_lngth + - cd_degr + - delta_left_right_id + - dd_degr + - feature_crossed + - structure_number + - i_r_min_vert_clear + - approach_width + - bridge_median_id + - bridge_loading_type_id + - bridge_loading_in_1000_lbs + - bridge_srvc_type_on_id + - bridge_srvc_type_under_id + - culvert_type_id + - roadway_width + - deck_width + - bridge_dir_of_traffic_id + - bridge_rte_struct_func_id + - bridge_ir_struct_func_id + - crossingnumber + - rrco + - poscrossing_id + - wdcode_id + - standstop + - yield + - sus_serious_injry_cnt + - nonincap_injry_cnt + - poss_injry_cnt + - non_injry_cnt + - unkn_injry_cnt + - tot_injry_cnt + - death_cnt + - mpo_id + - investigat_service_id + - investigat_da_id + - investigator_narrative + - geocoded + - geocode_status + - latitude_geocoded + - longitude_geocoded + - latitude_primary + - longitude_primary + - geocode_date + - geocode_provider + - qa_status + - last_update + - approval_date + - approved_by + - is_retired + - updated_by + - address_confirmed_primary + - address_confirmed_secondary + - est_comp_cost + - est_econ_cost + - position + - apd_confirmed_fatality + - apd_confirmed_death_count + - micromobility_device_flag + - cr3_stored_flag + - apd_human_update + - speed_mgmt_points + - geocode_match_quality + - geocode_match_metadata + - atd_mode_category_metadata + - location_id + - changes_approved_date + - austin_full_purpose + - original_city_id + - atd_fatality_count + - temp_record + - cr3_file_metadata + - cr3_ocr_extraction_date + - investigator_narrative_ocr + - est_comp_cost_crash_based + - has_directionality + - seek_direction + - surface_street_polygon + - visualization + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_crash_notes.yaml b/atd-vzd/metadata/databases/default/tables/public_crash_notes.yaml index 62bcf0d93..a3121c71e 100644 --- a/atd-vzd/metadata/databases/default/tables/public_crash_notes.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_crash_notes.yaml @@ -6,7 +6,7 @@ object_relationships: using: foreign_key_constraint_on: crash_id insert_permissions: - - role: editor + - role: vz-admin permission: check: {} columns: @@ -17,9 +17,20 @@ insert_permissions: - text - crash_id - user_email - - role: readonly + - role: editor permission: check: {} + columns: + - id + - created_at + - updated_at + - date + - text + - crash_id + - user_email +select_permissions: + - role: vz-admin + permission: columns: - crash_id - id @@ -28,7 +39,7 @@ insert_permissions: - created_at - date - updated_at -select_permissions: + filter: {} - role: editor permission: columns: @@ -52,7 +63,7 @@ select_permissions: - updated_at filter: {} update_permissions: - - role: editor + - role: vz-admin permission: columns: - crash_id @@ -64,22 +75,22 @@ update_permissions: - updated_at filter: {} check: null - - role: readonly + - role: editor permission: columns: + - crash_id - id - - created_at - - updated_at - - date - text - - crash_id - user_email + - created_at + - date + - updated_at filter: {} check: null delete_permissions: - - role: editor + - role: vz-admin permission: filter: {} - - role: readonly + - role: editor permission: filter: {} From a0afb01b08cff1a91499beb5f7ae319fdac66f37 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 15:11:13 -0600 Subject: [PATCH 05/35] Add vz-admin to tables through view_vzv_header_totals --- .../default/tables/public_location_notes.yaml | 37 +++++++++++++++++++ ...ic_locations_with_crash_injury_counts.yaml | 11 ++++++ .../tables/public_recommendations.yaml | 37 +++++++++++++++++++ .../public_recommendations_partners.yaml | 25 +++++++++++++ ..._location_crashes_by_manner_collision.yaml | 7 ++++ ...ew_location_crashes_by_veh_body_style.yaml | 7 ++++ .../public_view_location_crashes_global.yaml | 30 +++++++++++++++ ...iew_location_injry_count_cost_summary.yaml | 9 +++++ 8 files changed, 163 insertions(+) diff --git a/atd-vzd/metadata/databases/default/tables/public_location_notes.yaml b/atd-vzd/metadata/databases/default/tables/public_location_notes.yaml index 10ce94459..b357b90e3 100644 --- a/atd-vzd/metadata/databases/default/tables/public_location_notes.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_location_notes.yaml @@ -2,6 +2,17 @@ table: name: location_notes schema: public insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - date + - user_email + - created_at + - updated_at + - text + - id + - location_id - role: editor permission: check: {} @@ -14,6 +25,17 @@ insert_permissions: - id - location_id select_permissions: + - role: vz-admin + permission: + columns: + - id + - location_id + - text + - user_email + - created_at + - date + - updated_at + filter: {} - role: editor permission: columns: @@ -37,6 +59,18 @@ select_permissions: - updated_at filter: {} update_permissions: + - role: vz-admin + permission: + columns: + - id + - location_id + - text + - user_email + - created_at + - date + - updated_at + filter: {} + check: null - role: editor permission: columns: @@ -50,6 +84,9 @@ update_permissions: filter: {} check: null delete_permissions: + - role: vz-admin + permission: + filter: {} - role: editor permission: filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_locations_with_crash_injury_counts.yaml b/atd-vzd/metadata/databases/default/tables/public_locations_with_crash_injury_counts.yaml index d7201a70e..828a4a41b 100644 --- a/atd-vzd/metadata/databases/default/tables/public_locations_with_crash_injury_counts.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_locations_with_crash_injury_counts.yaml @@ -2,6 +2,17 @@ table: name: locations_with_crash_injury_counts schema: public select_permissions: + - role: vz-admin + permission: + columns: + - description + - location_id + - crash_count + - total_est_comp_cost + - fatalities_count + - serious_injury_count + filter: {} + allow_aggregations: true - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml b/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml index fe3b37918..07a1e3bdc 100644 --- a/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml @@ -17,6 +17,17 @@ array_relationships: name: recommendations_partners schema: public insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - id + - created_at + - crash_id + - recommendation_status_id + - rec_text + - created_by + - rec_update - role: editor permission: check: {} @@ -29,6 +40,17 @@ insert_permissions: - created_by - rec_update select_permissions: + - role: vz-admin + permission: + columns: + - crash_id + - id + - recommendation_status_id + - created_by + - rec_text + - rec_update + - created_at + filter: {} - role: editor permission: columns: @@ -52,6 +74,18 @@ select_permissions: - created_at filter: {} update_permissions: + - role: vz-admin + permission: + columns: + - crash_id + - id + - recommendation_status_id + - created_by + - rec_text + - rec_update + - created_at + filter: {} + check: {} - role: editor permission: columns: @@ -65,6 +99,9 @@ update_permissions: filter: {} check: {} delete_permissions: + - role: vz-admin + permission: + filter: {} - role: editor permission: filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml b/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml index 4bbdd2a3a..6ecff74d8 100644 --- a/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml @@ -9,6 +9,13 @@ object_relationships: using: foreign_key_constraint_on: recommendation_id insert_permissions: + - role: vz-admin + permission: + check: {} + columns: + - id + - recommendation_id + - partner_id - role: editor permission: check: {} @@ -17,6 +24,13 @@ insert_permissions: - recommendation_id - partner_id select_permissions: + - role: vz-admin + permission: + columns: + - id + - partner_id + - recommendation_id + filter: {} - role: editor permission: columns: @@ -32,6 +46,14 @@ select_permissions: - recommendation_id filter: {} update_permissions: + - role: vz-admin + permission: + columns: + - id + - partner_id + - recommendation_id + filter: {} + check: {} - role: editor permission: columns: @@ -41,6 +63,9 @@ update_permissions: filter: {} check: {} delete_permissions: + - role: vz-admin + permission: + filter: {} - role: editor permission: filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_manner_collision.yaml b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_manner_collision.yaml index 93affa23e..7ad99e20b 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_manner_collision.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_manner_collision.yaml @@ -2,6 +2,13 @@ table: name: view_location_crashes_by_manner_collision schema: public select_permissions: + - role: vz-admin + permission: + columns: + - location_id + - collsn_desc + - count + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_veh_body_style.yaml b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_veh_body_style.yaml index 1146d719e..493bf5730 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_veh_body_style.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_veh_body_style.yaml @@ -2,6 +2,13 @@ table: name: view_location_crashes_by_veh_body_style schema: public select_permissions: + - role: vz-admin + permission: + columns: + - location_id + - veh_body_styl_desc + - count + filter: {} - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_global.yaml b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_global.yaml index 197a6741b..c229e67bf 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_global.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_global.yaml @@ -2,6 +2,36 @@ table: name: view_location_crashes_global schema: public select_permissions: + - role: vz-admin + permission: + columns: + - crash_id + - type + - location_id + - case_id + - crash_date + - crash_time + - day_of_week + - crash_sev_id + - longitude_primary + - latitude_primary + - address_confirmed_primary + - address_confirmed_secondary + - non_injry_cnt + - nonincap_injry_cnt + - poss_injry_cnt + - sus_serious_injry_cnt + - tot_injry_cnt + - death_cnt + - unkn_injry_cnt + - est_comp_cost + - collsn_desc + - travel_direction + - movement_desc + - veh_body_styl_desc + - veh_unit_desc_desc + filter: {} + allow_aggregations: true - role: editor permission: columns: diff --git a/atd-vzd/metadata/databases/default/tables/public_view_location_injry_count_cost_summary.yaml b/atd-vzd/metadata/databases/default/tables/public_view_location_injry_count_cost_summary.yaml index 9ff8cd0f6..0696c05b2 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_location_injry_count_cost_summary.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_location_injry_count_cost_summary.yaml @@ -2,6 +2,15 @@ table: name: view_location_injry_count_cost_summary schema: public select_permissions: + - role: vz-admin + permission: + columns: + - location_id + - total_crashes + - total_deaths + - total_serious_injuries + - est_comp_cost + filter: {} - role: editor permission: columns: From 77ce847c9ee1bebb761f7b974dfbdafed81023c9 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 15:23:55 -0600 Subject: [PATCH 06/35] Rein in role name strings --- atd-vze/src/auth/authContext.js | 17 ++++++++++++----- atd-vze/src/auth/rbac-rules.js | 10 ++++++++-- atd-vze/src/views/Users/UserForm.js | 7 ++++--- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/atd-vze/src/auth/authContext.js b/atd-vze/src/auth/authContext.js index c689a7eef..c80b31019 100644 --- a/atd-vze/src/auth/authContext.js +++ b/atd-vze/src/auth/authContext.js @@ -1,5 +1,11 @@ import React, { useState, useEffect, useContext } from "react"; import createAuth0Client from "@auth0/auth0-spa-js"; +import { + adminRoleName, + editorRoleName, + itSupervisorRoleName, + readOnlyRoleName, +} from "./rbac-rules"; export const Auth0Context = React.createContext(); @@ -14,13 +20,14 @@ export const urlPath = // Roles helpers for rules-based access export const isReadOnly = rolesArray => - rolesArray.includes("readonly") && rolesArray.length === 1; + rolesArray.includes(readOnlyRoleName) && rolesArray.length === 1; -export const isEditor = rolesArray => rolesArray.includes("editor"); +export const isEditor = rolesArray => rolesArray.includes(editorRoleName); -export const isAdmin = rolesArray => rolesArray.includes("admin"); +export const isAdmin = rolesArray => rolesArray.includes(adminRoleName); -export const isItSupervisor = rolesArray => rolesArray.includes("itSupervisor"); +export const isItSupervisor = rolesArray => + rolesArray.includes(itSupervisorRoleName); // Fires after Auth0 handles auth so we can redirect to where user started export const onRedirectCallback = appState => { @@ -102,7 +109,7 @@ export const Auth0Provider = ({ const getHasuraRole = () => { const role = user["https://hasura.io/jwt/claims"]["x-hasura-allowed-roles"]; // If user has more than one role, they are itSupervisor and need admin role for Hasura to return data - return role.length > 1 ? "admin" : role[0]; + return role.length > 1 ? adminRoleName : role[0]; }; // Context provider supplies value below at index.js level diff --git a/atd-vze/src/auth/rbac-rules.js b/atd-vze/src/auth/rbac-rules.js index c24cbbd58..a62662a8a 100644 --- a/atd-vze/src/auth/rbac-rules.js +++ b/atd-vze/src/auth/rbac-rules.js @@ -23,17 +23,23 @@ const adminStaticRules = [ const itSupervisorStaticRules = ["user:makeAdmin"]; +// Centralize role names used elsewhere in the app +export const readOnlyRoleName = "readonly"; +export const adminRoleName = "vz-admin"; +export const editorRoleName = "editor"; +export const itSupervisorRoleName = "itSupervisor"; + export const rules = { // Changing readonly to camelCase will break Hasura permissions readonly: { label: "Read-only", static: readOnlyStaticRules, }, - editor: { + [editorRoleName]: { label: "Editor", static: [...readOnlyStaticRules, ...editorStaticRules], }, - admin: { + [adminRoleName]: { label: "Admin", static: [...readOnlyStaticRules, ...editorStaticRules, ...adminStaticRules], }, diff --git a/atd-vze/src/views/Users/UserForm.js b/atd-vze/src/views/Users/UserForm.js index bc840e29a..e52357766 100644 --- a/atd-vze/src/views/Users/UserForm.js +++ b/atd-vze/src/views/Users/UserForm.js @@ -19,6 +19,7 @@ import { Alert, Spinner, } from "reactstrap"; +import { readOnlyRoleName, itSupervisorRoleName } from "../../auth/rbac-rules"; const UserForm = ({ type, id = null }) => { const token = window.localStorage.getItem("id_token"); @@ -34,7 +35,7 @@ const UserForm = ({ type, id = null }) => { connection: "Username-Password-Authentication", // Set account type verify_email: true, // Send email verification app_metadata: { - roles: ["readonly"], // Default to lowest level access + roles: [readOnlyRoleName], // Default to lowest level access }, }; @@ -45,7 +46,7 @@ const UserForm = ({ type, id = null }) => { const [isFormSubmitted, setIsFormSubmitted] = useState(false); // Roles that admin is not allowed to set - const adminRoleExceptions = ["itSupervisor"]; + const adminRoleExceptions = [itSupervisorRoleName]; const radioButtonRoles = roles => Object.entries(rules).reduce((acc, [role, roleConfig]) => { @@ -56,7 +57,7 @@ const UserForm = ({ type, id = null }) => { disabled: // Non-supervisors cannot edit other supervisor's role (!isItSupervisor(roles) && - userFormData.app_metadata.roles.includes("itSupervisor")) || + userFormData.app_metadata.roles.includes(itSupervisorRoleName)) || // Prevent editing own role user.email === userFormData.email || // Admin can give all roles except supervisor From 0eef0258b19cafab21ce5e5cb2ccd5e40ea6855b Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 15:27:12 -0600 Subject: [PATCH 07/35] Update admin role in VZ API --- atd-cr3-api/server.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/atd-cr3-api/server.py b/atd-cr3-api/server.py index fc111502e..da4311602 100644 --- a/atd-cr3-api/server.py +++ b/atd-cr3-api/server.py @@ -39,6 +39,8 @@ AWS_S3_CR3_LOCATION = os.getenv("AWS_S3_CR3_LOCATION", "") AWS_S3_BUCKET = os.getenv("AWS_S3_BUCKET", "") +ADMIN_ROLE_NAME = "vz-admin" + def get_api_token(): """ @@ -327,8 +329,14 @@ def user_list_users(): user_dict = current_user._get_current_object() page = request.args.get("page") per_page = request.args.get("per_page") - if isValidUser(user_dict) and hasUserRole("admin", user_dict): - endpoint = f"https://{AUTH0_DOMAIN}/api/v2/users?page=" + page + "&per_page=" + per_page + "&include_totals=true" + if isValidUser(user_dict) and hasUserRole(ADMIN_ROLE_NAME, user_dict): + endpoint = ( + f"https://{AUTH0_DOMAIN}/api/v2/users?page=" + + page + + "&per_page=" + + per_page + + "&include_totals=true" + ) headers = {"Authorization": f"Bearer {get_api_token()}"} response = requests.get(endpoint, headers=headers).json() return jsonify(response) @@ -342,7 +350,7 @@ def user_list_users(): @requires_auth def user_get_user(id): user_dict = current_user._get_current_object() - if isValidUser(user_dict) and hasUserRole("admin", user_dict): + if isValidUser(user_dict) and hasUserRole(ADMIN_ROLE_NAME, user_dict): endpoint = f"https://{AUTH0_DOMAIN}/api/v2/users/" + id headers = {"Authorization": f"Bearer {get_api_token()}"} response = requests.get(endpoint, headers=headers).json() @@ -357,7 +365,7 @@ def user_get_user(id): @requires_auth def user_create_user(): user_dict = current_user._get_current_object() - if isValidUser(user_dict) and hasUserRole("admin", user_dict): + if isValidUser(user_dict) and hasUserRole(ADMIN_ROLE_NAME, user_dict): json_data = request.json endpoint = f"https://{AUTH0_DOMAIN}/api/v2/users" headers = {"Authorization": f"Bearer {get_api_token()}"} @@ -373,7 +381,7 @@ def user_create_user(): @requires_auth def user_update_user(id): user_dict = current_user._get_current_object() - if isValidUser(user_dict) and hasUserRole("admin", user_dict): + if isValidUser(user_dict) and hasUserRole(ADMIN_ROLE_NAME, user_dict): json_data = request.json endpoint = f"https://{AUTH0_DOMAIN}/api/v2/users/" + id headers = {"Authorization": f"Bearer {get_api_token()}"} @@ -389,7 +397,7 @@ def user_update_user(id): @requires_auth def user_unblock_user(id): user_dict = current_user._get_current_object() - if isValidUser(user_dict) and hasUserRole("admin", user_dict): + if isValidUser(user_dict) and hasUserRole(ADMIN_ROLE_NAME, user_dict): endpoint = f"https://{AUTH0_DOMAIN}/api/v2/user_blocks/" + id headers = {"Authorization": f"Bearer {get_api_token()}"} response = requests.delete(endpoint, headers=headers) @@ -404,7 +412,7 @@ def user_unblock_user(id): @requires_auth def user_delete_user(id): user_dict = current_user._get_current_object() - if isValidUser(user_dict) and hasUserRole("admin", user_dict): + if isValidUser(user_dict) and hasUserRole(ADMIN_ROLE_NAME, user_dict): endpoint = f"https://{AUTH0_DOMAIN}/api/v2/users/" + id headers = {"Authorization": f"Bearer {get_api_token()}"} response = requests.delete(endpoint, headers=headers) From 97947277e0e6828374fe46629c27ffc4b1f6547d Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 16:17:27 -0600 Subject: [PATCH 08/35] Update permissions to match UI rules for recommendations and people names --- .../tables/public_atd_txdot_primaryperson.yaml | 3 +++ .../default/tables/public_recommendations.yaml | 11 ----------- .../tables/public_recommendations_partners.yaml | 7 ------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml index 3defe88c6..25f774a4d 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml @@ -198,9 +198,12 @@ select_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id + - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id + - prsn_last_name + - prsn_mid_name - prsn_nbr - prsn_occpnt_pos_id - prsn_rest_id diff --git a/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml b/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml index 07a1e3bdc..e4e7a4064 100644 --- a/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml @@ -62,17 +62,6 @@ select_permissions: - rec_update - created_at filter: {} - - role: readonly - permission: - columns: - - crash_id - - id - - recommendation_status_id - - created_by - - rec_text - - rec_update - - created_at - filter: {} update_permissions: - role: vz-admin permission: diff --git a/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml b/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml index 6ecff74d8..6ba611ad6 100644 --- a/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml @@ -38,13 +38,6 @@ select_permissions: - partner_id - recommendation_id filter: {} - - role: readonly - permission: - columns: - - id - - partner_id - - recommendation_id - filter: {} update_permissions: - role: vz-admin permission: From afb39d710ab2b46a9baec0ef5b494a8232b985f7 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 16:24:59 -0600 Subject: [PATCH 09/35] Use the new role vars across the rules --- atd-vze/src/auth/rbac-rules.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atd-vze/src/auth/rbac-rules.js b/atd-vze/src/auth/rbac-rules.js index a62662a8a..8120f246d 100644 --- a/atd-vze/src/auth/rbac-rules.js +++ b/atd-vze/src/auth/rbac-rules.js @@ -31,7 +31,7 @@ export const itSupervisorRoleName = "itSupervisor"; export const rules = { // Changing readonly to camelCase will break Hasura permissions - readonly: { + [readOnlyRoleName]: { label: "Read-only", static: readOnlyStaticRules, }, @@ -43,7 +43,7 @@ export const rules = { label: "Admin", static: [...readOnlyStaticRules, ...editorStaticRules, ...adminStaticRules], }, - itSupervisor: { + [itSupervisorRoleName]: { label: "IT Supervisor", static: [ ...readOnlyStaticRules, From 8f4eabefd03c73a4feea5aa535afd825e16fdb65 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 16:42:19 -0600 Subject: [PATCH 10/35] Add the primaryperson name update permissions for vz-admin too --- .../default/tables/public_atd_txdot_primaryperson.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml index 25f774a4d..de438ec3a 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml @@ -343,9 +343,12 @@ update_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id + - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id + - prsn_last_name + - prsn_mid_name - prsn_name_honorific - prsn_nbr - prsn_occpnt_pos_id From f743238472172d3aa38fd3587476a14271b5cb14 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Feb 2024 17:28:06 -0600 Subject: [PATCH 11/35] Fix fatalities view permissions and people select for vz-admin on person table --- .../tables/public_atd_txdot_person.yaml | 9 +++----- .../tables/public_view_fatalities.yaml | 21 +++++++++++++++++++ atd-vze/src/auth/Can.js | 2 +- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml index f008d77de..f12270f21 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml @@ -138,12 +138,9 @@ insert_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id - - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id - - prsn_last_name - - prsn_mid_name - prsn_name_honorific - prsn_name_sfx - prsn_nbr @@ -182,9 +179,12 @@ select_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id + - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id + - prsn_last_name + - prsn_mid_name - prsn_nbr - prsn_occpnt_pos_id - prsn_rest_id @@ -351,12 +351,9 @@ update_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id - - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id - - prsn_last_name - - prsn_mid_name - prsn_name_honorific - prsn_name_sfx - prsn_nbr diff --git a/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml b/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml index adba916e1..2101ee48c 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml @@ -38,3 +38,24 @@ object_relationships: remote_table: name: recommendations schema: public +select_permissions: + - role: vz-admin + permission: + columns: + - ytd_fatal_crash + - ytd_fatality + - case_id + - crash_date + - crash_id + - id + - person_id + - primaryperson_id + - engineering_area + - law_enforcement_num + - location + - victim_name + - year + - crash_time + filter: {} + allow_aggregations: true + comment: "" \ No newline at end of file diff --git a/atd-vze/src/auth/Can.js b/atd-vze/src/auth/Can.js index cb1f3d600..630dc1793 100644 --- a/atd-vze/src/auth/Can.js +++ b/atd-vze/src/auth/Can.js @@ -9,7 +9,7 @@ const check = (rules, roles, action, data) => { acc.push(false); } - const staticPermissions = permissions.static; + const staticPermissions = permissions?.static; if (staticPermissions && staticPermissions.includes(action)) { // static rule not provided for action From 146c3aa43e73b9d060e0adff3a92f416dd33607f Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 27 Feb 2024 13:36:03 -0600 Subject: [PATCH 12/35] Fix inconsistent numbers view permissions --- ...public_view_crashes_inconsistent_numbers.yaml | 16 ++++++++++++++++ .../default/tables/public_view_fatalities.yaml | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml b/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml index 3518d4165..1db05af88 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml @@ -1,3 +1,19 @@ table: name: view_crashes_inconsistent_numbers schema: public +select_permissions: + - role: vz-admin + permission: + columns: + - atp_death_cnt + - atpp_death_cnt + - atpp_sus_serious_injry_cnt + - atp_sus_serious_injry_cnt + - atu_death_cnt + - atu_sus_serious_injry_cnt + - atc_crash_id + - atc_death_cnt + - sus_serious_injry_cnt + filter: {} + allow_aggregations: true + comment: "" \ No newline at end of file diff --git a/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml b/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml index 2101ee48c..d5276389b 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml @@ -58,4 +58,4 @@ select_permissions: - crash_time filter: {} allow_aggregations: true - comment: "" \ No newline at end of file + comment: "" From e833f38064d9f1c7260e967868cce5d5692a05c2 Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 27 Feb 2024 14:17:36 -0600 Subject: [PATCH 13/35] Newline --- .../tables/public_view_crashes_inconsistent_numbers.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml b/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml index 1db05af88..7c2d8ce1c 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml @@ -16,4 +16,4 @@ select_permissions: - sus_serious_injry_cnt filter: {} allow_aggregations: true - comment: "" \ No newline at end of file + comment: "" From 2351b4eaac2fdf48f66fde5cb24b50b1a6f4878c Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 29 Feb 2024 10:52:26 -0600 Subject: [PATCH 14/35] Bump Hasura --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7dfd2203a..79b5aedd9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.7' services: graphql-engine: - image: hasura/graphql-engine:v2.36.3 + image: hasura/graphql-engine:v2.37.1 volumes: - ./atd-vzd/graphql-engine-metadata:/metadata container_name: visionzero-graphql-engine From 36c0217571cdb9d20c2303aaa7a74caf3180fc99 Mon Sep 17 00:00:00 2001 From: John Clary Date: Thu, 29 Feb 2024 17:18:36 -0500 Subject: [PATCH 15/35] rework initial date calc and only truncate data if we have new data --- .../socrata_export/process/helpers_socrata.py | 19 ++++++++++--------- atd-etl/socrata_export/socrata_export.py | 13 +++++++++---- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/atd-etl/socrata_export/process/helpers_socrata.py b/atd-etl/socrata_export/process/helpers_socrata.py index 306ff0c9f..cf752b434 100644 --- a/atd-etl/socrata_export/process/helpers_socrata.py +++ b/atd-etl/socrata_export/process/helpers_socrata.py @@ -9,12 +9,13 @@ https://pypi.org/project/requests/ https://pypi.org/project/sodapy/ """ + import sys import requests import json from copy import deepcopy from process.config import ATD_ETL_CONFIG -from datetime import date, timedelta +from datetime import date, timedelta, datetime # Dict to translate modes to correlate with atd__mode_category_lkp table mode_categories = { @@ -88,9 +89,9 @@ def flatten_hasura_response(records): ) else: # Create key at top-level - formatted_record[ - third_level_key - ] = third_level_value + formatted_record[third_level_key] = ( + third_level_value + ) # Copy non-nested key-values to top-level (if value is not null) # Null records can create unwanted columns at top level of record elif second_level_value is not None: @@ -315,7 +316,7 @@ def format_person_data(data, formatter_config): return formatted_records -def get_date_limit(): +def two_weeks_ago(): """ Returns a string with the date two weeks ago in iso format: yyyy-mm-dd :return str: @@ -327,13 +328,13 @@ def get_date_limit(): return (d - timedelta(days=14)).strftime("%Y-%m-%d") -def get_initial_date_limit(): +def ten_years_ago(): """ - Returns a string with the date ten years ago in iso format: yyyy-mm-dd + Returns a string with the date on January 1st, ten years ago in format: yyyy-mm-dd. :return str: """ - d = date.today() - return d.replace(year=d.year - 10).strftime("%Y-%m-%d") + year = datetime.now().year + return f"{year - 10}-01-01" def is_no_time_constraint(): diff --git a/atd-etl/socrata_export/socrata_export.py b/atd-etl/socrata_export/socrata_export.py index fcbf06cc4..9cbd4acb6 100755 --- a/atd-etl/socrata_export/socrata_export.py +++ b/atd-etl/socrata_export/socrata_export.py @@ -69,8 +69,7 @@ # For each config, get records from Hasura and upsert to Socrata until res is [] for config in query_configs: print(f'Starting {config["table"]} table...') - print(f'Truncating {config["table"]} table...') - client.replace(config["dataset_uid"], []) + is_truncate_complete = False records = None offset = 0 limit = 1000 @@ -82,8 +81,8 @@ query = config["template"].substitute( limit=limit, offset=offset, - date_limit=get_date_limit(), - initial_date_limit=get_initial_date_limit(), + date_limit=two_weeks_ago(), + initial_date_limit=ten_years_ago(), ) offset += limit data = run_hasura_query(query) @@ -96,6 +95,12 @@ # Format records records = config["formatter"](data, config["formatter_config"]) + # truncate the existing data set once we have records + if records and not is_truncate_complete: + print(f'Truncating {config["table"]} table...') + client.replace(config["dataset_uid"], []) + is_truncate_complete = True + # Upsert records to Socrata client.upsert(config["dataset_uid"], records) total_records += len(records) From 65cd6a2b9061f431daf0fc78421b74db8acf1157 Mon Sep 17 00:00:00 2001 From: John Clary Date: Thu, 29 Feb 2024 17:26:37 -0500 Subject: [PATCH 16/35] remove newline --- atd-etl/socrata_export/process/helpers_socrata.py | 1 - 1 file changed, 1 deletion(-) diff --git a/atd-etl/socrata_export/process/helpers_socrata.py b/atd-etl/socrata_export/process/helpers_socrata.py index cf752b434..486ed5099 100644 --- a/atd-etl/socrata_export/process/helpers_socrata.py +++ b/atd-etl/socrata_export/process/helpers_socrata.py @@ -9,7 +9,6 @@ https://pypi.org/project/requests/ https://pypi.org/project/sodapy/ """ - import sys import requests import json From c36eb4e973250f14868403d47d2fc1df76b9367f Mon Sep 17 00:00:00 2001 From: rose Date: Fri, 1 Mar 2024 14:24:19 -0600 Subject: [PATCH 17/35] remove edit coordinates button for readonly users --- atd-vze/src/views/Crashes/Crash.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/atd-vze/src/views/Crashes/Crash.js b/atd-vze/src/views/Crashes/Crash.js index 18cefcddb..659b27980 100644 --- a/atd-vze/src/views/Crashes/Crash.js +++ b/atd-vze/src/views/Crashes/Crash.js @@ -11,7 +11,12 @@ import { } from "reactstrap"; import { withApollo } from "react-apollo"; import { useQuery } from "@apollo/react-hooks"; -import { useAuth0, isAdmin, isItSupervisor } from "../../auth/authContext"; +import { + useAuth0, + isAdmin, + isItSupervisor, + isReadOnly, +} from "../../auth/authContext"; import CrashCollapses from "./CrashCollapses"; import CrashMap from "./Maps/CrashMap"; @@ -237,7 +242,7 @@ function Crash(props) { : "No Primary Coordinates"} - {!isEditingCoords && ( + {!isEditingCoords && !isReadOnly(roles) && ( - + {selectOptions.map(option => ( + + ))} + + )} + {fieldUiType === "text" && ( + handleInputChange(e)} + /> + )} + + + + + + ) : ( fieldValueDisplay )} - - fieldConfigObject.editable && - !isEditing && - setEditField(field) - } - > - {fieldConfigObject.editable && !isEditing && ( - - )} - + {!isEditing && ( + + {fieldConfigObject.editable && !isEditing && ( + + )} + + )} ); })} diff --git a/atd-vze/src/Components/dataTable.css b/atd-vze/src/Components/dataTable.css new file mode 100644 index 000000000..9359f3f85 --- /dev/null +++ b/atd-vze/src/Components/dataTable.css @@ -0,0 +1,3 @@ +.data-table-editable:hover { + background-color: rgba(32,168,216, .2) !important; +} From 8b0fbebf102f7738684f8cfb593472dad93078b9 Mon Sep 17 00:00:00 2001 From: John Clary Date: Sun, 3 Mar 2024 23:30:49 -0500 Subject: [PATCH 21/35] use flexboxes instead of row/col --- atd-vze/src/Components/DataTable.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/atd-vze/src/Components/DataTable.js b/atd-vze/src/Components/DataTable.js index 4d6643237..e5c5f91cd 100644 --- a/atd-vze/src/Components/DataTable.js +++ b/atd-vze/src/Components/DataTable.js @@ -14,7 +14,6 @@ import { Input, Table, Button, - Row, } from "reactstrap"; import "./dataTable.css"; @@ -183,8 +182,8 @@ const DataTable = ({ handleFieldUpdate(e, section.fields, field) } > - - +
+
{fieldUiType === "select" && ( handleInputChange(e)} /> )} - - +
+
+
+
- - +
+
) : ( fieldValueDisplay From 80e2a4278b2b81e15d5e2fa48a9240b3685f05e5 Mon Sep 17 00:00:00 2001 From: John Clary Date: Sun, 3 Mar 2024 23:38:37 -0500 Subject: [PATCH 22/35] disable autocomplete and 1password on inputs --- atd-vze/src/Components/DataTable.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/atd-vze/src/Components/DataTable.js b/atd-vze/src/Components/DataTable.js index e5c5f91cd..e6b18b25a 100644 --- a/atd-vze/src/Components/DataTable.js +++ b/atd-vze/src/Components/DataTable.js @@ -210,6 +210,9 @@ const DataTable = ({ type="text" defaultValue={fieldValue} onChange={e => handleInputChange(e)} + autoComplete="off" + // disable 1password autofill + data-1p-ignore /> )} From 90fc5b35f76018eb5bc79b12fe519e7b99ef77fb Mon Sep 17 00:00:00 2001 From: John Clary Date: Mon, 4 Mar 2024 07:12:39 -0500 Subject: [PATCH 23/35] nix hover style and clean up --- atd-vze/src/Components/DataTable.js | 30 ++++++++-------------------- atd-vze/src/Components/dataTable.css | 3 --- 2 files changed, 8 insertions(+), 25 deletions(-) delete mode 100644 atd-vze/src/Components/dataTable.css diff --git a/atd-vze/src/Components/DataTable.js b/atd-vze/src/Components/DataTable.js index e6b18b25a..d9471e0a8 100644 --- a/atd-vze/src/Components/DataTable.js +++ b/atd-vze/src/Components/DataTable.js @@ -16,8 +16,6 @@ import { Button, } from "reactstrap"; -import "./dataTable.css"; - import { GET_LOOKUPS } from "../queries/lookups"; const DataTable = ({ @@ -35,6 +33,7 @@ const DataTable = ({ // Disable edit features if only role is "readonly" const { getRoles } = useAuth0(); const roles = getRoles(); + const isReadOnlyUser = isReadOnly(roles); const [showModal, setShowModal] = useState(false); @@ -76,11 +75,6 @@ const DataTable = ({ const fieldLabel = fieldConfigObject.label; - // Disable editing if user is only "readonly" - if (fieldConfigObject.editable && isReadOnly(roles)) { - fieldConfigObject.editable = false; - } - // Set data table (alternate if defined in data map) const fieldDataTable = fieldConfigObject.alternateTable || dataTable; @@ -151,25 +145,17 @@ const DataTable = ({ }; const fieldValueDisplay = renderLookupDescString(); + const canClickToEdit = + !isReadOnlyUser && + fieldConfigObject.editable && + !isEditing; return ( - fieldConfigObject.editable && - !isEditing && - setEditField(field) - } + onClick={() => canClickToEdit && setEditField(field)} style={{ - cursor: - fieldConfigObject.editable && !isEditing - ? "pointer" - : "auto", + cursor: canClickToEdit ? "pointer" : "auto", }} > @@ -237,7 +223,7 @@ const DataTable = ({ {!isEditing && ( - {fieldConfigObject.editable && !isEditing && ( + {canClickToEdit && ( )} diff --git a/atd-vze/src/Components/dataTable.css b/atd-vze/src/Components/dataTable.css deleted file mode 100644 index 9359f3f85..000000000 --- a/atd-vze/src/Components/dataTable.css +++ /dev/null @@ -1,3 +0,0 @@ -.data-table-editable:hover { - background-color: rgba(32,168,216, .2) !important; -} From 110c0e369758fc528079fb3619dce408988abd3b Mon Sep 17 00:00:00 2001 From: John Clary Date: Mon, 4 Mar 2024 14:37:54 -0500 Subject: [PATCH 24/35] add padding between input and buttons --- atd-vze/src/Components/DataTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atd-vze/src/Components/DataTable.js b/atd-vze/src/Components/DataTable.js index d9471e0a8..f5a8e6793 100644 --- a/atd-vze/src/Components/DataTable.js +++ b/atd-vze/src/Components/DataTable.js @@ -202,7 +202,7 @@ const DataTable = ({ /> )} -
+
From ddb1b866a4545f02e60b209105eeb2183be01ab9 Mon Sep 17 00:00:00 2001 From: John Clary Date: Mon, 4 Mar 2024 14:47:25 -0500 Subject: [PATCH 25/35] use styled buttons like related records table --- atd-vze/src/Components/DataTable.js | 30 +++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/atd-vze/src/Components/DataTable.js b/atd-vze/src/Components/DataTable.js index f5a8e6793..677a13a95 100644 --- a/atd-vze/src/Components/DataTable.js +++ b/atd-vze/src/Components/DataTable.js @@ -6,6 +6,7 @@ import get from "lodash.get"; import { formatCostToDollars, formatDateTimeString } from "../helpers/format"; import { + Button, Card, CardHeader, CardBody, @@ -13,7 +14,6 @@ import { Col, Input, Table, - Button, } from "reactstrap"; import { GET_LOOKUPS } from "../queries/lookups"; @@ -202,18 +202,24 @@ const DataTable = ({ /> )}
-
- -
-
- + +
From e7de67e0d4fe3c15bc33e89c79634ecd57fdfe70 Mon Sep 17 00:00:00 2001 From: John Clary Date: Mon, 4 Mar 2024 21:51:08 -0500 Subject: [PATCH 26/35] use cache-and-network fetch policy for crashes, locations, and fatalities --- atd-vze/src/views/Crashes/Crashes.js | 5 +++++ atd-vze/src/views/Fatalities/Fatalities.js | 10 +++++----- atd-vze/src/views/Locations/Locations.js | 5 +++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/atd-vze/src/views/Crashes/Crashes.js b/atd-vze/src/views/Crashes/Crashes.js index 7cbc963ae..39b1e5858 100644 --- a/atd-vze/src/views/Crashes/Crashes.js +++ b/atd-vze/src/views/Crashes/Crashes.js @@ -21,6 +21,11 @@ let queryConf = { where: {}, limit: 25, offset: 0, + options: { + useQuery: { + fetchPolicy: "cache-and-network", + }, + }, }; let crashesQuery = new gqlAbstract(queryConf); diff --git a/atd-vze/src/views/Fatalities/Fatalities.js b/atd-vze/src/views/Fatalities/Fatalities.js index d3f12b481..89c1c3e19 100644 --- a/atd-vze/src/views/Fatalities/Fatalities.js +++ b/atd-vze/src/views/Fatalities/Fatalities.js @@ -12,11 +12,6 @@ import { // Our initial query configuration let queryConf = { - options: { - useQuery: { - fetchPolicy: "no-cache", - }, - }, table: "view_fatalities", single_item: "crashes", showDateRange: true, @@ -25,6 +20,11 @@ let queryConf = { where: {}, limit: 25, offset: 0, + options: { + useQuery: { + fetchPolicy: "cache-and-network", + }, + }, }; const minDate = subYears(new Date(), 10); diff --git a/atd-vze/src/views/Locations/Locations.js b/atd-vze/src/views/Locations/Locations.js index aa360aed2..d05fa19b3 100644 --- a/atd-vze/src/views/Locations/Locations.js +++ b/atd-vze/src/views/Locations/Locations.js @@ -66,6 +66,11 @@ let queryConf = { where: {}, limit: 25, offset: 0, + options: { + useQuery: { + fetchPolicy: "cache-and-network", + }, + }, }; const dateRangeStart = format(subYears(new Date(), 5), "MM/dd/yyyy"); From 745fa9adf662d7e8f924b85e87ab2855f241eb76 Mon Sep 17 00:00:00 2001 From: Frank Hereford Date: Thu, 7 Mar 2024 13:41:00 -0600 Subject: [PATCH 27/35] Add person names to protected people fields --- atd-etl/cris_import/lib/mappings.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/atd-etl/cris_import/lib/mappings.py b/atd-etl/cris_import/lib/mappings.py index f13cce0fb..42a7f75da 100644 --- a/atd-etl/cris_import/lib/mappings.py +++ b/atd-etl/cris_import/lib/mappings.py @@ -74,6 +74,10 @@ def no_override_columns(): "prsn_occpnt_pos_id", # key column (but why?) "injury_severity", "prsn_age", + "prsn_name_honorific", + "prsn_last_name", + "prsn_first_name", + "prsn_mid_name", }, "atd_txdot_primaryperson": { "crash_id", # key column @@ -83,6 +87,10 @@ def no_override_columns(): "prsn_occpnt_pos_id", # key column (but why?) "injury_severity", "prsn_age", + "prsn_name_honorific", + "prsn_last_name", + "prsn_first_name", + "prsn_mid_name", }, "atd_txdot_charges": { "crash_id", # key column From 24ff334f95deb128b81cce2715a5523b1d9604dc Mon Sep 17 00:00:00 2001 From: Frank Hereford Date: Mon, 11 Mar 2024 09:40:23 -0500 Subject: [PATCH 28/35] Align important fields between VZE & cris_import.py --- atd-etl/cris_import/lib/mappings.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/atd-etl/cris_import/lib/mappings.py b/atd-etl/cris_import/lib/mappings.py index 42a7f75da..e05d026c9 100644 --- a/atd-etl/cris_import/lib/mappings.py +++ b/atd-etl/cris_import/lib/mappings.py @@ -57,14 +57,19 @@ def no_override_columns(): "address_confirmed_secondary", "private_dr_fl", "road_constr_zone_fl", + "case_id", + "sus_serious_injry_cnt", + "intrsct_relat_id", + "rpt_outside_city_limit_fl", }, "atd_txdot_units": { "crash_id", # key column "unit_nbr", # key column "travel_direction", "movement_id", - "death_cnt", "sus_serious_injry_cnt", + "unit_desc_id", + "veh_body_styl_id", }, "atd_txdot_person": { "crash_id", # key column @@ -78,6 +83,8 @@ def no_override_columns(): "prsn_last_name", "prsn_first_name", "prsn_mid_name", + "prsn_gndr_id", + "prsn_ethnicity_id", }, "atd_txdot_primaryperson": { "crash_id", # key column @@ -91,6 +98,8 @@ def no_override_columns(): "prsn_last_name", "prsn_first_name", "prsn_mid_name", + "prsn_gndr_id", + "prsn_ethnicity_id", }, "atd_txdot_charges": { "crash_id", # key column From 690e4c82350a5d5a8f9f61929263904d78c2456c Mon Sep 17 00:00:00 2001 From: Frank Hereford Date: Mon, 11 Mar 2024 12:16:58 -0500 Subject: [PATCH 29/35] add comment about function import naming --- atd-etl/cris_import/cris_import.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/atd-etl/cris_import/cris_import.py b/atd-etl/cris_import/cris_import.py index b56abf23f..ab448c2fd 100755 --- a/atd-etl/cris_import/cris_import.py +++ b/atd-etl/cris_import/cris_import.py @@ -673,6 +673,9 @@ def align_records(map_state): all_changed_columns = ", ".join(important_changed_columns["changed_columns"] + changed_columns["changed_columns"]) # insert_change_template() is used with minimal changes from previous version of the ETL to better ensure conflict system compatibility + # the line immediately below is actually called `insert_crash_change_template`. As Rose + # observed today, non-crashes are not being handled correctly by the system. I think + # changes to those types of records may be just getting dropped. mutation = insert_change_template(new_record_dict=source, differences=all_changed_columns, crash_id=str(source["crash_id"])) if not dry_run: print("Making a mutation for " + str(source["crash_id"])) From da6f5e8b65548ead4d9277e51944ec95c95578c0 Mon Sep 17 00:00:00 2001 From: Frank Hereford Date: Mon, 11 Mar 2024 12:18:12 -0500 Subject: [PATCH 30/35] add file to hold open the dev extract folder --- atd-etl/cris_import/development_extracts/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 atd-etl/cris_import/development_extracts/.gitignore diff --git a/atd-etl/cris_import/development_extracts/.gitignore b/atd-etl/cris_import/development_extracts/.gitignore new file mode 100644 index 000000000..d77864a99 --- /dev/null +++ b/atd-etl/cris_import/development_extracts/.gitignore @@ -0,0 +1,2 @@ +*.zip + From 08bb44c9725c0963794d57f305dfa139c4e3376d Mon Sep 17 00:00:00 2001 From: Frank Hereford Date: Mon, 11 Mar 2024 12:19:42 -0500 Subject: [PATCH 31/35] remove explicit table name --- atd-etl/cris_import/lib/mappings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atd-etl/cris_import/lib/mappings.py b/atd-etl/cris_import/lib/mappings.py index e05d026c9..15869326f 100644 --- a/atd-etl/cris_import/lib/mappings.py +++ b/atd-etl/cris_import/lib/mappings.py @@ -52,7 +52,7 @@ def no_override_columns(): "atd_fatality_count", "apd_confirmed_death_count", "tot_injry_cnt", - "atd_txdot_crashes.sus_serious_injry_cnt", + "sus_serious_injry_cnt", "address_confirmed_primary", "address_confirmed_secondary", "private_dr_fl", From d4fb09a8cae1c8ef9df93bfe73b28a8edc4b0936 Mon Sep 17 00:00:00 2001 From: Frank Hereford Date: Mon, 11 Mar 2024 12:20:47 -0500 Subject: [PATCH 32/35] refine comment --- atd-etl/cris_import/cris_import.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/atd-etl/cris_import/cris_import.py b/atd-etl/cris_import/cris_import.py index ab448c2fd..e246a00a8 100755 --- a/atd-etl/cris_import/cris_import.py +++ b/atd-etl/cris_import/cris_import.py @@ -642,6 +642,10 @@ def align_records(map_state): important_changed_columns = util.get_changed_columns(pg, important_column_aggregators, output_map, table, linkage_clauses, record_key_sql, map_state["import_schema"]) + # print(f"Changed_columns: {changed_columns}") + # print(f"Important_changed_columns: {important_changed_columns}") + # input() + if len(important_changed_columns['changed_columns']) > 0: # This execution branch leads to the conflict resolution system in VZ @@ -673,15 +677,15 @@ def align_records(map_state): all_changed_columns = ", ".join(important_changed_columns["changed_columns"] + changed_columns["changed_columns"]) # insert_change_template() is used with minimal changes from previous version of the ETL to better ensure conflict system compatibility - # the line immediately below is actually called `insert_crash_change_template`. As Rose - # observed today, non-crashes are not being handled correctly by the system. I think - # changes to those types of records may be just getting dropped. + # the line immediately below is actually called `insert_crash_change_template`. mutation = insert_change_template(new_record_dict=source, differences=all_changed_columns, crash_id=str(source["crash_id"])) if not dry_run: print("Making a mutation for " + str(source["crash_id"])) graphql.make_hasura_request(query=mutation, endpoint=GRAPHQL_ENDPOINT, admin_secret=GRAPHQL_ENDPOINT_KEY) else: - # This execution branch leads to forming an update statement and executing it + # Thi) + # print(f"Mutation: {mutation}") + # input(s execution branch leads to forming an update statement and executing it if len(changed_columns["changed_columns"]) == 0: print(update_statement) From 91cde9f4a99de32f040ee0b13c140770ed9f5a09 Mon Sep 17 00:00:00 2001 From: Frank Hereford Date: Mon, 11 Mar 2024 12:22:07 -0500 Subject: [PATCH 33/35] removing debug print statement --- atd-etl/cris_import/cris_import.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/atd-etl/cris_import/cris_import.py b/atd-etl/cris_import/cris_import.py index e246a00a8..9141ceee7 100755 --- a/atd-etl/cris_import/cris_import.py +++ b/atd-etl/cris_import/cris_import.py @@ -641,11 +641,6 @@ def align_records(map_state): # Do the same thing, but this time using the SQL clauses formed from "important" columns. important_changed_columns = util.get_changed_columns(pg, important_column_aggregators, output_map, table, linkage_clauses, record_key_sql, map_state["import_schema"]) - - # print(f"Changed_columns: {changed_columns}") - # print(f"Important_changed_columns: {important_changed_columns}") - # input() - if len(important_changed_columns['changed_columns']) > 0: # This execution branch leads to the conflict resolution system in VZ @@ -677,16 +672,12 @@ def align_records(map_state): all_changed_columns = ", ".join(important_changed_columns["changed_columns"] + changed_columns["changed_columns"]) # insert_change_template() is used with minimal changes from previous version of the ETL to better ensure conflict system compatibility - # the line immediately below is actually called `insert_crash_change_template`. mutation = insert_change_template(new_record_dict=source, differences=all_changed_columns, crash_id=str(source["crash_id"])) if not dry_run: print("Making a mutation for " + str(source["crash_id"])) graphql.make_hasura_request(query=mutation, endpoint=GRAPHQL_ENDPOINT, admin_secret=GRAPHQL_ENDPOINT_KEY) else: - # Thi) - # print(f"Mutation: {mutation}") - # input(s execution branch leads to forming an update statement and executing it - + # This execution branch leads to forming an update statement and executing it if len(changed_columns["changed_columns"]) == 0: print(update_statement) raise "No changed columns? Why are we forming an update? This is a bug." From d21b19787bac9d27f6c437ff9f8d9202525703ee Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 14 Mar 2024 08:55:45 -0500 Subject: [PATCH 34/35] Merge master; Hasura metadata formatting --- ...public_atd__coordination_partners_lkp.yaml | 6 +- .../tables/public_atd__mode_category_lkp.yaml | 6 +- ...public_atd__recommendation_status_lkp.yaml | 6 +- .../tables/public_atd_apd_blueform.yaml | 14 ++-- ...ic_atd_location_crash_and_cost_totals.yaml | 6 +- .../public_atd_txdot__asmp_level_lkp.yaml | 6 +- .../tables/public_atd_txdot__city_lkp.yaml | 6 +- .../tables/public_atd_txdot__collsn_lkp.yaml | 6 +- .../public_atd_txdot__contrib_factr_lkp.yaml | 6 +- .../public_atd_txdot__est_comp_cost.yaml | 6 +- ..._atd_txdot__est_comp_cost_crash_based.yaml | 6 +- .../public_atd_txdot__ethnicity_lkp.yaml | 6 +- .../tables/public_atd_txdot__gndr_lkp.yaml | 6 +- .../public_atd_txdot__injry_sev_lkp.yaml | 14 ++-- .../public_atd_txdot__intrsct_relat_lkp.yaml | 6 +- .../public_atd_txdot__light_cond_lkp.yaml | 6 +- .../tables/public_atd_txdot__movt_lkp.yaml | 6 +- .../public_atd_txdot__obj_struck_lkp.yaml | 6 +- .../public_atd_txdot__prsn_type_lkp.yaml | 6 +- .../public_atd_txdot__road_part_lkp.yaml | 6 +- .../public_atd_txdot__road_type_lkp.yaml | 6 +- .../tables/public_atd_txdot__rwy_sys_lkp.yaml | 6 +- .../public_atd_txdot__street_sfx_lkp.yaml | 6 +- .../public_atd_txdot__traffic_cntl_lkp.yaml | 6 +- .../public_atd_txdot__trvl_dir_lkp.yaml | 10 +-- .../public_atd_txdot__veh_body_styl_lkp.yaml | 6 +- .../public_atd_txdot__veh_make_lkp.yaml | 6 +- .../tables/public_atd_txdot__veh_mod_lkp.yaml | 6 +- .../public_atd_txdot__veh_unit_desc_lkp.yaml | 14 ++-- .../public_atd_txdot__wthr_cond_lkp.yaml | 6 +- .../tables/public_atd_txdot__y_n_lkp.yaml | 6 +- .../tables/public_atd_txdot_change_log.yaml | 6 +- .../public_atd_txdot_change_status.yaml | 18 ++--- .../tables/public_atd_txdot_changes.yaml | 30 ++++---- .../tables/public_atd_txdot_changes_view.yaml | 22 +++--- .../tables/public_atd_txdot_charges.yaml | 34 ++++----- .../public_atd_txdot_crash_locations.yaml | 30 ++++---- ...lic_atd_txdot_crash_locations_ranking.yaml | 6 +- .../tables/public_atd_txdot_crash_status.yaml | 14 ++-- .../tables/public_atd_txdot_crashes.yaml | 16 ++-- .../tables/public_atd_txdot_geocoders.yaml | 6 +- .../tables/public_atd_txdot_locations.yaml | 6 +- .../tables/public_atd_txdot_person.yaml | 32 ++++---- .../public_atd_txdot_primaryperson.yaml | 28 +++---- .../tables/public_atd_txdot_streets.yaml | 74 +++++++++---------- .../tables/public_atd_txdot_units.yaml | 40 +++++----- .../default/tables/public_crash_notes.yaml | 18 ++--- .../default/tables/public_location_notes.yaml | 18 ++--- ...ic_locations_with_crash_injury_counts.yaml | 18 ++--- .../tables/public_recommendations.yaml | 16 ++-- .../public_recommendations_partners.yaml | 16 ++-- ...lic_view_crashes_inconsistent_numbers.yaml | 2 +- .../tables/public_view_fatalities.yaml | 2 +- ..._location_crashes_by_manner_collision.yaml | 14 ++-- ...ew_location_crashes_by_veh_body_style.yaml | 10 +-- .../public_view_location_crashes_global.yaml | 58 +++++++-------- ...iew_location_injry_count_cost_summary.yaml | 10 +-- 57 files changed, 379 insertions(+), 379 deletions(-) diff --git a/atd-vzd/metadata/databases/default/tables/public_atd__coordination_partners_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd__coordination_partners_lkp.yaml index 103ab3ea4..785d558ee 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd__coordination_partners_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd__coordination_partners_lkp.yaml @@ -10,21 +10,21 @@ array_relationships: name: recommendations_partners schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - coord_partner_desc - id filter: {} comment: "" - - role: editor + - role: readonly permission: columns: - coord_partner_desc - id filter: {} comment: "" - - role: readonly + - role: vz-admin permission: columns: - coord_partner_desc diff --git a/atd-vzd/metadata/databases/default/tables/public_atd__mode_category_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd__mode_category_lkp.yaml index db1cc1b9f..9905bc14e 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd__mode_category_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd__mode_category_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd__mode_category_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - atd_mode_category_desc @@ -10,7 +10,7 @@ select_permissions: - id filter: {} comment: "" - - role: editor + - role: readonly permission: columns: - atd_mode_category_desc @@ -18,7 +18,7 @@ select_permissions: - id filter: {} comment: "" - - role: readonly + - role: vz-admin permission: columns: - atd_mode_category_desc diff --git a/atd-vzd/metadata/databases/default/tables/public_atd__recommendation_status_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd__recommendation_status_lkp.yaml index 62f68ed58..2fb0e57bd 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd__recommendation_status_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd__recommendation_status_lkp.yaml @@ -10,21 +10,21 @@ array_relationships: name: recommendations schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - id - rec_status_desc filter: {} comment: "" - - role: editor + - role: readonly permission: columns: - id - rec_status_desc filter: {} comment: "" - - role: readonly + - role: vz-admin permission: columns: - id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_apd_blueform.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_apd_blueform.yaml index 3134eea6a..f4f9aa495 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_apd_blueform.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_apd_blueform.yaml @@ -2,7 +2,7 @@ table: name: atd_apd_blueform schema: public insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: @@ -19,7 +19,7 @@ insert_permissions: - longitude - position - speed_mgmt_points - - role: editor + - role: vz-admin permission: check: {} columns: @@ -37,7 +37,7 @@ insert_permissions: - position - speed_mgmt_points select_permissions: - - role: vz-admin + - role: editor permission: columns: - address @@ -55,7 +55,7 @@ select_permissions: - speed_mgmt_points filter: {} allow_aggregations: true - - role: editor + - role: readonly permission: columns: - address @@ -73,7 +73,7 @@ select_permissions: - speed_mgmt_points filter: {} allow_aggregations: true - - role: readonly + - role: vz-admin permission: columns: - address @@ -92,7 +92,7 @@ select_permissions: filter: {} allow_aggregations: true update_permissions: - - role: vz-admin + - role: editor permission: columns: - address @@ -110,7 +110,7 @@ update_permissions: - speed_mgmt_points filter: {} check: null - - role: editor + - role: vz-admin permission: columns: - address diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_location_crash_and_cost_totals.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_location_crash_and_cost_totals.yaml index 7821f55c6..ad439bddb 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_location_crash_and_cost_totals.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_location_crash_and_cost_totals.yaml @@ -2,7 +2,7 @@ table: name: atd_location_crash_and_cost_totals schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - cr3_est_comp_cost @@ -13,7 +13,7 @@ select_permissions: - total_crashes - total_est_comp_cost filter: {} - - role: editor + - role: readonly permission: columns: - cr3_est_comp_cost @@ -24,7 +24,7 @@ select_permissions: - total_crashes - total_est_comp_cost filter: {} - - role: readonly + - role: vz-admin permission: columns: - cr3_est_comp_cost diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__asmp_level_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__asmp_level_lkp.yaml index b44f5cd46..949d8b2d6 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__asmp_level_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__asmp_level_lkp.yaml @@ -2,19 +2,19 @@ table: name: atd_txdot__asmp_level_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - asmp_level_desc - asmp_level_id filter: {} - - role: editor + - role: readonly permission: columns: - asmp_level_desc - asmp_level_id filter: {} - - role: readonly + - role: vz-admin permission: columns: - asmp_level_desc diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__city_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__city_lkp.yaml index bb843a2a5..49e82a258 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__city_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__city_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__city_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - city_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - city_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - city_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__collsn_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__collsn_lkp.yaml index e4cc5bbc3..a9564ce57 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__collsn_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__collsn_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__collsn_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - collsn_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - collsn_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - collsn_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__contrib_factr_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__contrib_factr_lkp.yaml index 93f0cbd5a..189ae467e 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__contrib_factr_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__contrib_factr_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__contrib_factr_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - contrib_factr_id @@ -11,7 +11,7 @@ select_permissions: - eff_end_date - other filter: {} - - role: editor + - role: readonly permission: columns: - contrib_factr_id @@ -20,7 +20,7 @@ select_permissions: - eff_end_date - other filter: {} - - role: readonly + - role: vz-admin permission: columns: - contrib_factr_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost.yaml index 781af97b6..94f682fd0 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost.yaml @@ -2,19 +2,19 @@ table: name: atd_txdot__est_comp_cost schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - est_comp_cost_amount - est_comp_cost_id filter: {} - - role: editor + - role: readonly permission: columns: - est_comp_cost_amount - est_comp_cost_id filter: {} - - role: readonly + - role: vz-admin permission: columns: - est_comp_cost_amount diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost_crash_based.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost_crash_based.yaml index e8cf1c717..65f84ed02 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost_crash_based.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__est_comp_cost_crash_based.yaml @@ -2,21 +2,21 @@ table: name: atd_txdot__est_comp_cost_crash_based schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - est_comp_cost_id - est_comp_cost_amount - est_comp_cost_desc filter: {} - - role: editor + - role: readonly permission: columns: - est_comp_cost_id - est_comp_cost_amount - est_comp_cost_desc filter: {} - - role: readonly + - role: vz-admin permission: columns: - est_comp_cost_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__ethnicity_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__ethnicity_lkp.yaml index 61a9c6261..26787a419 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__ethnicity_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__ethnicity_lkp.yaml @@ -2,19 +2,19 @@ table: name: atd_txdot__ethnicity_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - ethnicity_desc - ethnicity_id filter: {} - - role: editor + - role: readonly permission: columns: - ethnicity_desc - ethnicity_id filter: {} - - role: readonly + - role: vz-admin permission: columns: - ethnicity_desc diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__gndr_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__gndr_lkp.yaml index 5192b0920..18740cce3 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__gndr_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__gndr_lkp.yaml @@ -2,19 +2,19 @@ table: name: atd_txdot__gndr_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - gndr_desc - gndr_id filter: {} - - role: editor + - role: readonly permission: columns: - gndr_desc - gndr_id filter: {} - - role: readonly + - role: vz-admin permission: columns: - gndr_desc diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__injry_sev_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__injry_sev_lkp.yaml index 64889d02a..0b9dc769e 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__injry_sev_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__injry_sev_lkp.yaml @@ -10,7 +10,7 @@ array_relationships: name: atd_txdot_person schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - injry_sev_id @@ -18,17 +18,17 @@ select_permissions: - eff_end_date - injry_sev_desc filter: {} - - role: editor + - role: readonly permission: columns: - - injry_sev_id - - eff_beg_date - - eff_end_date - injry_sev_desc + - injry_sev_id filter: {} - - role: readonly + - role: vz-admin permission: columns: - - injry_sev_desc - injry_sev_id + - eff_beg_date + - eff_end_date + - injry_sev_desc filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__intrsct_relat_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__intrsct_relat_lkp.yaml index 7003f15b0..86eb598a9 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__intrsct_relat_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__intrsct_relat_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__intrsct_relat_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - intrsct_relat_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - intrsct_relat_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - intrsct_relat_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__light_cond_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__light_cond_lkp.yaml index 98bca6c2d..f36bf3d4c 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__light_cond_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__light_cond_lkp.yaml @@ -2,19 +2,19 @@ table: name: atd_txdot__light_cond_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - light_cond_desc - light_cond_id filter: {} - - role: editor + - role: readonly permission: columns: - light_cond_desc - light_cond_id filter: {} - - role: readonly + - role: vz-admin permission: columns: - light_cond_desc diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__movt_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__movt_lkp.yaml index 26823ff3b..85abc4417 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__movt_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__movt_lkp.yaml @@ -2,19 +2,19 @@ table: name: atd_txdot__movt_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - movement_id - movement_desc filter: {} - - role: editor + - role: readonly permission: columns: - movement_id - movement_desc filter: {} - - role: readonly + - role: vz-admin permission: columns: - movement_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__obj_struck_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__obj_struck_lkp.yaml index c5cb7b6a9..8ee26b2ca 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__obj_struck_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__obj_struck_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__obj_struck_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - obj_struck_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - obj_struck_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - obj_struck_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__prsn_type_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__prsn_type_lkp.yaml index 883d3c019..b9f839efb 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__prsn_type_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__prsn_type_lkp.yaml @@ -2,19 +2,19 @@ table: name: atd_txdot__prsn_type_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - prsn_type_desc - prsn_type_id filter: {} - - role: editor + - role: readonly permission: columns: - prsn_type_desc - prsn_type_id filter: {} - - role: readonly + - role: vz-admin permission: columns: - prsn_type_desc diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_part_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_part_lkp.yaml index 66067aec7..d7865ebd8 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_part_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_part_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__road_part_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - road_part_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - road_part_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - road_part_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_type_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_type_lkp.yaml index de9b665ad..d77b0153b 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_type_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__road_type_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__road_type_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - road_type_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - road_type_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - road_type_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__rwy_sys_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__rwy_sys_lkp.yaml index d47c3fcb4..92b0ce5bb 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__rwy_sys_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__rwy_sys_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__rwy_sys_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - rwy_sys_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - rwy_sys_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - rwy_sys_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__street_sfx_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__street_sfx_lkp.yaml index ce00f43e6..b30ebe8e3 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__street_sfx_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__street_sfx_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__street_sfx_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - street_sfx_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - street_sfx_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - street_sfx_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__traffic_cntl_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__traffic_cntl_lkp.yaml index e067cceae..5452a57d9 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__traffic_cntl_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__traffic_cntl_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__traffic_cntl_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - traffic_cntl_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - traffic_cntl_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - traffic_cntl_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__trvl_dir_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__trvl_dir_lkp.yaml index 81a1964c2..c7efd2708 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__trvl_dir_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__trvl_dir_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__trvl_dir_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - trvl_dir_id @@ -10,19 +10,19 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - trvl_dir_id - - trvl_dir_desc - eff_beg_date - eff_end_date + - trvl_dir_desc filter: {} - - role: readonly + - role: vz-admin permission: columns: - trvl_dir_id + - trvl_dir_desc - eff_beg_date - eff_end_date - - trvl_dir_desc filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_body_styl_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_body_styl_lkp.yaml index 8f47113d0..69e89ca3f 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_body_styl_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_body_styl_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__veh_body_styl_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - veh_body_styl_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - veh_body_styl_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - veh_body_styl_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_make_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_make_lkp.yaml index e497a61fa..faeec154f 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_make_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_make_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__veh_make_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - veh_make_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - veh_make_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - veh_make_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_mod_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_mod_lkp.yaml index 2d00deaa8..b63bc4414 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_mod_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_mod_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__veh_mod_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - veh_mod_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - veh_mod_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - veh_mod_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_unit_desc_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_unit_desc_lkp.yaml index bb8d7b2dc..7a1bb38be 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_unit_desc_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__veh_unit_desc_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__veh_unit_desc_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - veh_unit_desc_id @@ -10,17 +10,17 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - - veh_unit_desc_id - veh_unit_desc_desc - - eff_beg_date - - eff_end_date + - veh_unit_desc_id filter: {} - - role: readonly + - role: vz-admin permission: columns: - - veh_unit_desc_desc - veh_unit_desc_id + - veh_unit_desc_desc + - eff_beg_date + - eff_end_date filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__wthr_cond_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__wthr_cond_lkp.yaml index a349a56df..aae6578c9 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__wthr_cond_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__wthr_cond_lkp.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot__wthr_cond_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - wthr_cond_id @@ -10,7 +10,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: editor + - role: readonly permission: columns: - wthr_cond_id @@ -18,7 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} - - role: readonly + - role: vz-admin permission: columns: - wthr_cond_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__y_n_lkp.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__y_n_lkp.yaml index 1bef62de4..5600fc8bf 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot__y_n_lkp.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot__y_n_lkp.yaml @@ -2,19 +2,19 @@ table: name: atd_txdot__y_n_lkp schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - y_n_id - y_n_desc filter: {} - - role: editor + - role: readonly permission: columns: - y_n_id - y_n_desc filter: {} - - role: readonly + - role: vz-admin permission: columns: - y_n_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_log.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_log.yaml index f28326d9a..608d02050 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_log.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_log.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot_change_log schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - change_log_id @@ -14,7 +14,7 @@ select_permissions: - update_timestamp - updated_by filter: {} - - role: editor + - role: readonly permission: columns: - change_log_id @@ -26,7 +26,7 @@ select_permissions: - update_timestamp - updated_by filter: {} - - role: readonly + - role: vz-admin permission: columns: - change_log_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_status.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_status.yaml index fcce73293..a8116e2c1 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_status.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_change_status.yaml @@ -2,15 +2,6 @@ table: name: atd_txdot_change_status schema: public select_permissions: - - role: vz-admin - permission: - columns: - - is_retired - - last_update - - change_status_id - - description_long - - description - filter: {} - role: editor permission: columns: @@ -29,3 +20,12 @@ select_permissions: - last_update - is_retired filter: {} + - role: vz-admin + permission: + columns: + - is_retired + - last_update + - change_status_id + - description_long + - description + filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes.yaml index ab3da15f0..585725ca6 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes.yaml @@ -12,21 +12,6 @@ object_relationships: name: atd_txdot_change_status schema: public select_permissions: - - role: vz-admin - permission: - columns: - - change_id - - record_id - - record_type - - record_json - - update_timestamp - - created_timestamp - - updated_by - - status_id - - affected_columns - - crash_date - - record_uqid - filter: {} - role: editor permission: columns: @@ -57,3 +42,18 @@ select_permissions: - record_type - updated_by filter: {} + - role: vz-admin + permission: + columns: + - change_id + - record_id + - record_type + - record_json + - update_timestamp + - created_timestamp + - updated_by + - status_id + - affected_columns + - crash_date + - record_uqid + filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes_view.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes_view.yaml index 72c0d24d9..b13384571 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes_view.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_changes_view.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot_changes_view schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - record_id @@ -16,31 +16,31 @@ select_permissions: - crash_date filter: {} allow_aggregations: true - - role: editor + - role: readonly permission: columns: - - record_id + - crash_date - change_id - - record_json - - created_timestamp + - record_id - status_id + - record_json - crash_fatal_flag - sus_serious_injury_cnt + - created_timestamp - status_description - - crash_date filter: {} allow_aggregations: true - - role: readonly + - role: vz-admin permission: columns: - - crash_date - - change_id - record_id - - status_id + - change_id - record_json + - created_timestamp + - status_id - crash_fatal_flag - sus_serious_injury_cnt - - created_timestamp - status_description + - crash_date filter: {} allow_aggregations: true diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_charges.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_charges.yaml index d6dc82ff5..e08051f04 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_charges.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_charges.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot_charges schema: public insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: @@ -16,7 +16,7 @@ insert_permissions: - last_update - citation_nbr - updated_by - - role: editor + - role: vz-admin permission: check: {} columns: @@ -31,7 +31,7 @@ insert_permissions: - citation_nbr - updated_by select_permissions: - - role: vz-admin + - role: editor permission: columns: - charge_id @@ -45,36 +45,36 @@ select_permissions: - updated_by - is_retired filter: {} - - role: editor + - role: readonly permission: columns: - - charge_id + - is_retired + - charge_cat_id - crash_id - - unit_nbr - prsn_nbr - - charge_cat_id + - charge_id + - unit_nbr - charge - - citation_nbr - last_update + - citation_nbr - updated_by - - is_retired filter: {} - - role: readonly + - role: vz-admin permission: columns: - - is_retired - - charge_cat_id - - crash_id - - prsn_nbr - charge_id + - crash_id - unit_nbr + - prsn_nbr + - charge_cat_id - charge - - last_update - citation_nbr + - last_update - updated_by + - is_retired filter: {} update_permissions: - - role: vz-admin + - role: editor permission: columns: - is_retired @@ -89,7 +89,7 @@ update_permissions: - updated_by filter: {} check: null - - role: editor + - role: vz-admin permission: columns: - is_retired diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations.yaml index af0f9c4b8..7fe44db9d 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations.yaml @@ -12,7 +12,7 @@ array_relationships: name: atd_txdot_crashes schema: public insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: @@ -23,7 +23,7 @@ insert_permissions: - comments - last_update - is_retired - - role: editor + - role: vz-admin permission: check: {} columns: @@ -35,7 +35,7 @@ insert_permissions: - last_update - is_retired select_permissions: - - role: vz-admin + - role: editor permission: columns: - comments @@ -47,32 +47,32 @@ select_permissions: - crash_location_id filter: {} allow_aggregations: true - - role: editor + - role: readonly permission: columns: - - comments - - crash_id - is_retired - last_update - - location_id - - metadata + - crash_id - crash_location_id + - metadata + - comments + - location_id filter: {} allow_aggregations: true - - role: readonly + - role: vz-admin permission: columns: + - comments + - crash_id - is_retired - last_update - - crash_id - - crash_location_id - - metadata - - comments - location_id + - metadata + - crash_location_id filter: {} allow_aggregations: true update_permissions: - - role: vz-admin + - role: editor permission: columns: - is_retired @@ -84,7 +84,7 @@ update_permissions: - location_id filter: {} check: null - - role: editor + - role: vz-admin permission: columns: - is_retired diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations_ranking.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations_ranking.yaml index c6b0f5d68..5f71356bc 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations_ranking.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_locations_ranking.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot_crash_locations_ranking schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - apd_confirmed_death_count @@ -10,7 +10,7 @@ select_permissions: - serious_injry_cnt - location_id filter: {} - - role: editor + - role: readonly permission: columns: - apd_confirmed_death_count @@ -18,7 +18,7 @@ select_permissions: - serious_injry_cnt - location_id filter: {} - - role: readonly + - role: vz-admin permission: columns: - apd_confirmed_death_count diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_status.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_status.yaml index f9d0998b7..3043ac49e 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_status.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crash_status.yaml @@ -2,7 +2,7 @@ table: name: atd_txdot_crash_status schema: public insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: @@ -11,7 +11,7 @@ insert_permissions: - crash_status_id - description_long - description - - role: editor + - role: vz-admin permission: check: {} columns: @@ -21,7 +21,7 @@ insert_permissions: - description_long - description select_permissions: - - role: vz-admin + - role: editor permission: columns: - is_retired @@ -30,7 +30,7 @@ select_permissions: - description_long - description filter: {} - - role: editor + - role: readonly permission: columns: - is_retired @@ -39,7 +39,7 @@ select_permissions: - description_long - description filter: {} - - role: readonly + - role: vz-admin permission: columns: - is_retired @@ -49,7 +49,7 @@ select_permissions: - description filter: {} update_permissions: - - role: vz-admin + - role: editor permission: columns: - is_retired @@ -59,7 +59,7 @@ update_permissions: - description filter: {} check: null - - role: editor + - role: vz-admin permission: columns: - is_retired diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crashes.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crashes.yaml index efdf2edce..063dfef25 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crashes.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_crashes.yaml @@ -116,8 +116,8 @@ array_relationships: remote_table: name: atd_txdot_units schema: public -insert_permissions: - - role: vz-admin +insert_permissions: + - role: editor permission: check: {} columns: @@ -343,7 +343,7 @@ insert_permissions: - wthr_cond_id - yield comment: "" - - role: editor + - role: vz-admin permission: check: {} columns: @@ -570,7 +570,7 @@ insert_permissions: - yield comment: "" select_permissions: - - role: vz-admin + - role: editor permission: columns: - active_school_zone_fl @@ -800,7 +800,7 @@ select_permissions: - yield filter: {} allow_aggregations: true - - role: editor + - role: readonly permission: columns: - active_school_zone_fl @@ -1030,7 +1030,7 @@ select_permissions: - yield filter: {} allow_aggregations: true - - role: readonly + - role: vz-admin permission: columns: - active_school_zone_fl @@ -1261,7 +1261,7 @@ select_permissions: filter: {} allow_aggregations: true update_permissions: - - role: vz-admin + - role: editor permission: columns: - active_school_zone_fl @@ -1488,7 +1488,7 @@ update_permissions: filter: {} check: null comment: "" - - role: editor + - role: vz-admin permission: columns: - active_school_zone_fl diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_geocoders.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_geocoders.yaml index c8b92f9a7..b666c79d6 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_geocoders.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_geocoders.yaml @@ -2,21 +2,21 @@ table: name: atd_txdot_geocoders schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - geocoder_id - description - name filter: {} - - role: editor + - role: readonly permission: columns: - geocoder_id - description - name filter: {} - - role: readonly + - role: vz-admin permission: columns: - geocoder_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_locations.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_locations.yaml index a6abe76dc..077d1af43 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_locations.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_locations.yaml @@ -31,7 +31,7 @@ array_relationships: name: view_location_crashes_by_veh_body_style schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - address @@ -58,7 +58,7 @@ select_permissions: - street_level filter: {} allow_aggregations: true - - role: editor + - role: readonly permission: columns: - address @@ -85,7 +85,7 @@ select_permissions: - street_level filter: {} allow_aggregations: true - - role: readonly + - role: vz-admin permission: columns: - address diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml index f12270f21..e1072e10e 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_person.yaml @@ -70,7 +70,7 @@ object_relationships: name: atd_txdot_units schema: public insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: @@ -94,12 +94,9 @@ insert_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id - - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id - - prsn_last_name - - prsn_mid_name - prsn_name_honorific - prsn_name_sfx - prsn_nbr @@ -114,7 +111,7 @@ insert_permissions: - unit_nbr - unkn_injry_cnt - updated_by - - role: editor + - role: vz-admin permission: check: {} columns: @@ -138,9 +135,12 @@ insert_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id + - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id + - prsn_last_name + - prsn_mid_name - prsn_name_honorific - prsn_name_sfx - prsn_nbr @@ -156,7 +156,7 @@ insert_permissions: - unkn_injry_cnt - updated_by select_permissions: - - role: vz-admin + - role: editor permission: columns: - crash_id @@ -179,12 +179,9 @@ select_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id - - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id - - prsn_last_name - - prsn_mid_name - prsn_nbr - prsn_occpnt_pos_id - prsn_rest_id @@ -200,7 +197,7 @@ select_permissions: - years_of_life_lost filter: {} allow_aggregations: true - - role: editor + - role: readonly permission: columns: - crash_id @@ -241,7 +238,7 @@ select_permissions: - years_of_life_lost filter: {} allow_aggregations: true - - role: readonly + - role: vz-admin permission: columns: - crash_id @@ -264,9 +261,12 @@ select_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id + - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id + - prsn_last_name + - prsn_mid_name - prsn_nbr - prsn_occpnt_pos_id - prsn_rest_id @@ -283,7 +283,7 @@ select_permissions: filter: {} allow_aggregations: true update_permissions: - - role: vz-admin + - role: editor permission: columns: - crash_id @@ -306,12 +306,9 @@ update_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id - - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id - - prsn_last_name - - prsn_mid_name - prsn_name_honorific - prsn_name_sfx - prsn_nbr @@ -328,7 +325,7 @@ update_permissions: - updated_by filter: {} check: null - - role: editor + - role: vz-admin permission: columns: - crash_id @@ -351,9 +348,12 @@ update_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id + - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id + - prsn_last_name + - prsn_mid_name - prsn_name_honorific - prsn_name_sfx - prsn_nbr diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml index de438ec3a..9862efd7a 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_primaryperson.yaml @@ -76,7 +76,7 @@ object_relationships: name: atd_txdot_units schema: public insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: @@ -122,7 +122,7 @@ insert_permissions: - unit_nbr - unkn_injry_cnt - updated_by - - role: editor + - role: vz-admin permission: check: {} columns: @@ -169,7 +169,7 @@ insert_permissions: - unkn_injry_cnt - updated_by select_permissions: - - role: vz-admin + - role: editor permission: columns: - crash_id @@ -198,12 +198,9 @@ select_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id - - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id - - prsn_last_name - - prsn_mid_name - prsn_nbr - prsn_occpnt_pos_id - prsn_rest_id @@ -219,7 +216,7 @@ select_permissions: - years_of_life_lost filter: {} allow_aggregations: true - - role: editor + - role: readonly permission: columns: - crash_id @@ -266,7 +263,7 @@ select_permissions: - years_of_life_lost filter: {} allow_aggregations: true - - role: readonly + - role: vz-admin permission: columns: - crash_id @@ -295,9 +292,12 @@ select_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id + - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id + - prsn_last_name + - prsn_mid_name - prsn_nbr - prsn_occpnt_pos_id - prsn_rest_id @@ -313,8 +313,8 @@ select_permissions: - years_of_life_lost filter: {} allow_aggregations: true -update_permissions: - - role: vz-admin +update_permissions: + - role: editor permission: columns: - crash_id @@ -343,12 +343,9 @@ update_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id - - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id - - prsn_last_name - - prsn_mid_name - prsn_name_honorific - prsn_nbr - prsn_occpnt_pos_id @@ -364,7 +361,7 @@ update_permissions: - updated_by filter: {} check: null - - role: editor + - role: vz-admin permission: columns: - crash_id @@ -393,9 +390,12 @@ update_permissions: - prsn_drg_spec_type_id - prsn_ejct_id - prsn_ethnicity_id + - prsn_first_name - prsn_gndr_id - prsn_helmet_id - prsn_injry_sev_id + - prsn_last_name + - prsn_mid_name - prsn_name_honorific - prsn_nbr - prsn_occpnt_pos_id diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_streets.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_streets.yaml index bea2fcbe7..301c453e5 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_streets.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_streets.yaml @@ -2,43 +2,6 @@ table: name: atd_txdot_streets schema: public select_permissions: - - role: vz-admin - permission: - columns: - - street_id - - posted_speed_limit - - segment_id - - prefix_direction - - prefix_type - - street_name - - street_type - - suffix_direction - - left_from_address - - left_to_address - - right_from_address - - right_to_address - - left_block_from - - left_block_to - - right_block_from - - right_block_to - - full_street_name - - road_class - - speed_limit - - elevation_from - - elevation_to - - one_way - - cad_id - - street_place_id - - created_date - - created_by - - modified_by - - modified_date - - miles - - seconds - - built_status - - shape_length - - shape - filter: {} - role: editor permission: columns: @@ -113,3 +76,40 @@ select_permissions: - street_type - suffix_direction filter: {} + - role: vz-admin + permission: + columns: + - street_id + - posted_speed_limit + - segment_id + - prefix_direction + - prefix_type + - street_name + - street_type + - suffix_direction + - left_from_address + - left_to_address + - right_from_address + - right_to_address + - left_block_from + - left_block_to + - right_block_from + - right_block_to + - full_street_name + - road_class + - speed_limit + - elevation_from + - elevation_to + - one_way + - cad_id + - street_place_id + - created_date + - created_by + - modified_by + - modified_date + - miles + - seconds + - built_status + - shape_length + - shape + filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_units.yaml b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_units.yaml index fbea18382..8a3c0e37d 100644 --- a/atd-vzd/metadata/databases/default/tables/public_atd_txdot_units.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_atd_txdot_units.yaml @@ -75,7 +75,7 @@ object_relationships: name: atd_txdot__veh_unit_desc_lkp schema: public insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: @@ -140,6 +140,7 @@ insert_permissions: - ownr_state_id - ownr_zip - poss_injry_cnt + - rpt_autonomous_level_engaged_id - sus_serious_injry_cnt - tot_injry_cnt - travel_direction @@ -184,7 +185,7 @@ insert_permissions: - veh_transp_name - veh_trvl_dir_id - vin - - role: editor + - role: vz-admin permission: check: {} columns: @@ -249,7 +250,6 @@ insert_permissions: - ownr_state_id - ownr_zip - poss_injry_cnt - - rpt_autonomous_level_engaged_id - sus_serious_injry_cnt - tot_injry_cnt - travel_direction @@ -295,7 +295,7 @@ insert_permissions: - veh_trvl_dir_id - vin select_permissions: - - role: vz-admin + - role: editor permission: columns: - atd_mode_category @@ -369,6 +369,7 @@ select_permissions: - pedalcyclist_action_id - pedestrian_action_id - poss_injry_cnt + - rpt_autonomous_level_engaged_id - sus_serious_injry_cnt - tot_injry_cnt - travel_direction @@ -414,11 +415,10 @@ select_permissions: - veh_trvl_dir_id - vin filter: {} - - role: editor + - role: readonly permission: columns: - atd_mode_category - - autonomous_unit_id - cmv_bus_type_id - cmv_cargo_body_id - cmv_carrier_city_name @@ -457,7 +457,6 @@ select_permissions: - contrib_factr_p2_id - crash_id - death_cnt - - e_scooter_id - emer_respndr_fl - fin_resp_name - fin_resp_phone_nbr @@ -477,16 +476,8 @@ select_permissions: - non_injry_cnt - nonincap_injry_cnt - owner_lessee - - ownr_city_name - - ownr_mid_name - - ownr_name_honorific - - ownr_name_sfx - ownr_state_id - ownr_zip - - pbcat_pedalcyclist_id - - pbcat_pedestrian_id - - pedalcyclist_action_id - - pedestrian_action_id - poss_injry_cnt - rpt_autonomous_level_engaged_id - sus_serious_injry_cnt @@ -534,10 +525,11 @@ select_permissions: - veh_trvl_dir_id - vin filter: {} - - role: readonly + - role: vz-admin permission: columns: - atd_mode_category + - autonomous_unit_id - cmv_bus_type_id - cmv_cargo_body_id - cmv_carrier_city_name @@ -576,6 +568,7 @@ select_permissions: - contrib_factr_p2_id - crash_id - death_cnt + - e_scooter_id - emer_respndr_fl - fin_resp_name - fin_resp_phone_nbr @@ -595,10 +588,17 @@ select_permissions: - non_injry_cnt - nonincap_injry_cnt - owner_lessee + - ownr_city_name + - ownr_mid_name + - ownr_name_honorific + - ownr_name_sfx - ownr_state_id - ownr_zip + - pbcat_pedalcyclist_id + - pbcat_pedestrian_id + - pedalcyclist_action_id + - pedestrian_action_id - poss_injry_cnt - - rpt_autonomous_level_engaged_id - sus_serious_injry_cnt - tot_injry_cnt - travel_direction @@ -645,7 +645,7 @@ select_permissions: - vin filter: {} update_permissions: - - role: vz-admin + - role: editor permission: columns: - atd_mode_category @@ -719,6 +719,7 @@ update_permissions: - pedalcyclist_action_id - pedestrian_action_id - poss_injry_cnt + - rpt_autonomous_level_engaged_id - sus_serious_injry_cnt - tot_injry_cnt - travel_direction @@ -765,7 +766,7 @@ update_permissions: - vin filter: {} check: null - - role: editor + - role: vz-admin permission: columns: - atd_mode_category @@ -839,7 +840,6 @@ update_permissions: - pedalcyclist_action_id - pedestrian_action_id - poss_injry_cnt - - rpt_autonomous_level_engaged_id - sus_serious_injry_cnt - tot_injry_cnt - travel_direction diff --git a/atd-vzd/metadata/databases/default/tables/public_crash_notes.yaml b/atd-vzd/metadata/databases/default/tables/public_crash_notes.yaml index a3121c71e..d6699579c 100644 --- a/atd-vzd/metadata/databases/default/tables/public_crash_notes.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_crash_notes.yaml @@ -6,7 +6,7 @@ object_relationships: using: foreign_key_constraint_on: crash_id insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: @@ -17,7 +17,7 @@ insert_permissions: - text - crash_id - user_email - - role: editor + - role: vz-admin permission: check: {} columns: @@ -29,7 +29,7 @@ insert_permissions: - crash_id - user_email select_permissions: - - role: vz-admin + - role: editor permission: columns: - crash_id @@ -40,7 +40,7 @@ select_permissions: - date - updated_at filter: {} - - role: editor + - role: readonly permission: columns: - crash_id @@ -51,7 +51,7 @@ select_permissions: - date - updated_at filter: {} - - role: readonly + - role: vz-admin permission: columns: - crash_id @@ -63,7 +63,7 @@ select_permissions: - updated_at filter: {} update_permissions: - - role: vz-admin + - role: editor permission: columns: - crash_id @@ -75,7 +75,7 @@ update_permissions: - updated_at filter: {} check: null - - role: editor + - role: vz-admin permission: columns: - crash_id @@ -88,9 +88,9 @@ update_permissions: filter: {} check: null delete_permissions: - - role: vz-admin + - role: editor permission: filter: {} - - role: editor + - role: vz-admin permission: filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_location_notes.yaml b/atd-vzd/metadata/databases/default/tables/public_location_notes.yaml index b357b90e3..77bcabc0f 100644 --- a/atd-vzd/metadata/databases/default/tables/public_location_notes.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_location_notes.yaml @@ -2,7 +2,7 @@ table: name: location_notes schema: public insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: @@ -13,7 +13,7 @@ insert_permissions: - text - id - location_id - - role: editor + - role: vz-admin permission: check: {} columns: @@ -25,7 +25,7 @@ insert_permissions: - id - location_id select_permissions: - - role: vz-admin + - role: editor permission: columns: - id @@ -36,7 +36,7 @@ select_permissions: - date - updated_at filter: {} - - role: editor + - role: readonly permission: columns: - id @@ -47,7 +47,7 @@ select_permissions: - date - updated_at filter: {} - - role: readonly + - role: vz-admin permission: columns: - id @@ -59,7 +59,7 @@ select_permissions: - updated_at filter: {} update_permissions: - - role: vz-admin + - role: editor permission: columns: - id @@ -71,7 +71,7 @@ update_permissions: - updated_at filter: {} check: null - - role: editor + - role: vz-admin permission: columns: - id @@ -84,9 +84,9 @@ update_permissions: filter: {} check: null delete_permissions: - - role: vz-admin + - role: editor permission: filter: {} - - role: editor + - role: vz-admin permission: filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_locations_with_crash_injury_counts.yaml b/atd-vzd/metadata/databases/default/tables/public_locations_with_crash_injury_counts.yaml index 828a4a41b..dcbb0a307 100644 --- a/atd-vzd/metadata/databases/default/tables/public_locations_with_crash_injury_counts.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_locations_with_crash_injury_counts.yaml @@ -2,7 +2,7 @@ table: name: locations_with_crash_injury_counts schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - description @@ -13,25 +13,25 @@ select_permissions: - serious_injury_count filter: {} allow_aggregations: true - - role: editor + - role: readonly permission: columns: - - description - - location_id - crash_count - - total_est_comp_cost - fatalities_count - serious_injury_count + - total_est_comp_cost + - description + - location_id filter: {} allow_aggregations: true - - role: readonly + - role: vz-admin permission: columns: + - description + - location_id - crash_count + - total_est_comp_cost - fatalities_count - serious_injury_count - - total_est_comp_cost - - description - - location_id filter: {} allow_aggregations: true diff --git a/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml b/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml index e4e7a4064..098a6e5d9 100644 --- a/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml @@ -17,7 +17,7 @@ array_relationships: name: recommendations_partners schema: public insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: @@ -28,7 +28,7 @@ insert_permissions: - rec_text - created_by - rec_update - - role: editor + - role: vz-admin permission: check: {} columns: @@ -40,7 +40,7 @@ insert_permissions: - created_by - rec_update select_permissions: - - role: vz-admin + - role: editor permission: columns: - crash_id @@ -51,7 +51,7 @@ select_permissions: - rec_update - created_at filter: {} - - role: editor + - role: vz-admin permission: columns: - crash_id @@ -63,7 +63,7 @@ select_permissions: - created_at filter: {} update_permissions: - - role: vz-admin + - role: editor permission: columns: - crash_id @@ -75,7 +75,7 @@ update_permissions: - created_at filter: {} check: {} - - role: editor + - role: vz-admin permission: columns: - crash_id @@ -88,9 +88,9 @@ update_permissions: filter: {} check: {} delete_permissions: - - role: vz-admin + - role: editor permission: filter: {} - - role: editor + - role: vz-admin permission: filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml b/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml index 6ba611ad6..379bee508 100644 --- a/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml @@ -9,14 +9,14 @@ object_relationships: using: foreign_key_constraint_on: recommendation_id insert_permissions: - - role: vz-admin + - role: editor permission: check: {} columns: - id - recommendation_id - partner_id - - role: editor + - role: vz-admin permission: check: {} columns: @@ -24,14 +24,14 @@ insert_permissions: - recommendation_id - partner_id select_permissions: - - role: vz-admin + - role: editor permission: columns: - id - partner_id - recommendation_id filter: {} - - role: editor + - role: vz-admin permission: columns: - id @@ -39,7 +39,7 @@ select_permissions: - recommendation_id filter: {} update_permissions: - - role: vz-admin + - role: editor permission: columns: - id @@ -47,7 +47,7 @@ update_permissions: - recommendation_id filter: {} check: {} - - role: editor + - role: vz-admin permission: columns: - id @@ -56,9 +56,9 @@ update_permissions: filter: {} check: {} delete_permissions: - - role: vz-admin + - role: editor permission: filter: {} - - role: editor + - role: vz-admin permission: filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml b/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml index 7c2d8ce1c..3d21632e3 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_crashes_inconsistent_numbers.yaml @@ -4,7 +4,7 @@ table: select_permissions: - role: vz-admin permission: - columns: + columns: - atp_death_cnt - atpp_death_cnt - atpp_sus_serious_injry_cnt diff --git a/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml b/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml index d5276389b..00566870d 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_fatalities.yaml @@ -41,7 +41,7 @@ object_relationships: select_permissions: - role: vz-admin permission: - columns: + columns: - ytd_fatal_crash - ytd_fatality - case_id diff --git a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_manner_collision.yaml b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_manner_collision.yaml index 7ad99e20b..80f79ae75 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_manner_collision.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_manner_collision.yaml @@ -2,13 +2,6 @@ table: name: view_location_crashes_by_manner_collision schema: public select_permissions: - - role: vz-admin - permission: - columns: - - location_id - - collsn_desc - - count - filter: {} - role: editor permission: columns: @@ -23,3 +16,10 @@ select_permissions: - collsn_desc - location_id filter: {} + - role: vz-admin + permission: + columns: + - location_id + - collsn_desc + - count + filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_veh_body_style.yaml b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_veh_body_style.yaml index 493bf5730..9bb74bd34 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_veh_body_style.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_by_veh_body_style.yaml @@ -2,24 +2,24 @@ table: name: view_location_crashes_by_veh_body_style schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - location_id - veh_body_styl_desc - count filter: {} - - role: editor + - role: readonly permission: columns: + - count - location_id - veh_body_styl_desc - - count filter: {} - - role: readonly + - role: vz-admin permission: columns: - - count - location_id - veh_body_styl_desc + - count filter: {} diff --git a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_global.yaml b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_global.yaml index c229e67bf..248b4ce02 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_global.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_location_crashes_global.yaml @@ -2,7 +2,7 @@ table: name: view_location_crashes_global schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - crash_id @@ -32,63 +32,63 @@ select_permissions: - veh_unit_desc_desc filter: {} allow_aggregations: true - - role: editor + - role: readonly permission: columns: - - crash_id - - type - - location_id - - case_id - crash_date - - crash_time - - day_of_week - - crash_sev_id - - longitude_primary - latitude_primary - - address_confirmed_primary - - address_confirmed_secondary - - non_injry_cnt + - longitude_primary + - crash_id + - crash_sev_id + - death_cnt - nonincap_injry_cnt + - non_injry_cnt - poss_injry_cnt - sus_serious_injry_cnt - tot_injry_cnt - - death_cnt - unkn_injry_cnt - est_comp_cost + - address_confirmed_primary + - address_confirmed_secondary - collsn_desc - - travel_direction - movement_desc + - travel_direction + - type - veh_body_styl_desc - veh_unit_desc_desc + - crash_time + - case_id + - day_of_week + - location_id filter: {} allow_aggregations: true - - role: readonly + - role: vz-admin permission: columns: - - crash_date - - latitude_primary - - longitude_primary - crash_id + - type + - location_id + - case_id + - crash_date + - crash_time + - day_of_week - crash_sev_id - - death_cnt - - nonincap_injry_cnt + - longitude_primary + - latitude_primary + - address_confirmed_primary + - address_confirmed_secondary - non_injry_cnt + - nonincap_injry_cnt - poss_injry_cnt - sus_serious_injry_cnt - tot_injry_cnt + - death_cnt - unkn_injry_cnt - est_comp_cost - - address_confirmed_primary - - address_confirmed_secondary - collsn_desc - - movement_desc - travel_direction - - type + - movement_desc - veh_body_styl_desc - veh_unit_desc_desc - - crash_time - - case_id - - day_of_week - - location_id filter: {} allow_aggregations: true diff --git a/atd-vzd/metadata/databases/default/tables/public_view_location_injry_count_cost_summary.yaml b/atd-vzd/metadata/databases/default/tables/public_view_location_injry_count_cost_summary.yaml index 0696c05b2..355501d89 100644 --- a/atd-vzd/metadata/databases/default/tables/public_view_location_injry_count_cost_summary.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_view_location_injry_count_cost_summary.yaml @@ -2,7 +2,7 @@ table: name: view_location_injry_count_cost_summary schema: public select_permissions: - - role: vz-admin + - role: editor permission: columns: - location_id @@ -11,21 +11,21 @@ select_permissions: - total_serious_injuries - est_comp_cost filter: {} - - role: editor + - role: readonly permission: columns: - - location_id - total_crashes - total_deaths - total_serious_injuries - est_comp_cost + - location_id filter: {} - - role: readonly + - role: vz-admin permission: columns: + - location_id - total_crashes - total_deaths - total_serious_injuries - est_comp_cost - - location_id filter: {} From 5008afb9c1a5211ac267da106c710f18bfd6b0b6 Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 14 Mar 2024 10:03:22 -0500 Subject: [PATCH 35/35] Version bumps --- atd-vze/package.json | 2 +- atd-vzv/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/atd-vze/package.json b/atd-vze/package.json index 379005e00..d621e0749 100644 --- a/atd-vze/package.json +++ b/atd-vze/package.json @@ -1,6 +1,6 @@ { "name": "atd-vz-data", - "version": "1.42.0", + "version": "1.43.0", "homepage": "./", "description": "ATD Vision Zero Editor", "author": "ATD Data & Technology Services", diff --git a/atd-vzv/package.json b/atd-vzv/package.json index 6e1e69309..c44c52b0c 100644 --- a/atd-vzv/package.json +++ b/atd-vzv/package.json @@ -1,6 +1,6 @@ { "name": "atd-vzv", - "version": "1.42.0", + "version": "1.43.0", "homepage": "/viewer", "description": "ATD Vision Zero Viewer", "author": "ATD Data & Technology Services",