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) diff --git a/atd-etl/socrata_export/process/helpers_socrata.py b/atd-etl/socrata_export/process/helpers_socrata.py index 306ff0c9f..486ed5099 100644 --- a/atd-etl/socrata_export/process/helpers_socrata.py +++ b/atd-etl/socrata_export/process/helpers_socrata.py @@ -14,7 +14,7 @@ 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 +88,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 +315,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 +327,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) 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..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 @@ -24,3 +24,10 @@ select_permissions: - id filter: {} comment: "" + - role: vz-admin + permission: + columns: + - coord_partner_desc + - id + filter: {} + comment: "" 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..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 @@ -18,3 +18,11 @@ select_permissions: - id filter: {} comment: "" + - role: vz-admin + permission: + columns: + - atd_mode_category_desc + - atd_mode_category_mode_name + - id + filter: {} + comment: "" 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..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 @@ -24,3 +24,10 @@ select_permissions: - rec_status_desc filter: {} comment: "" + - role: vz-admin + permission: + columns: + - id + - rec_status_desc + filter: {} + comment: "" 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..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 @@ -19,6 +19,23 @@ insert_permissions: - longitude - position - speed_mgmt_points + - 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 select_permissions: - role: editor permission: @@ -56,6 +73,24 @@ select_permissions: - speed_mgmt_points filter: {} allow_aggregations: true + - 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 update_permissions: - role: editor permission: @@ -75,3 +110,21 @@ update_permissions: - speed_mgmt_points filter: {} check: null + - 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 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..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 @@ -24,3 +24,14 @@ select_permissions: - total_crashes - total_est_comp_cost filter: {} + - 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: {} 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..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 @@ -14,3 +14,9 @@ select_permissions: - asmp_level_desc - asmp_level_id filter: {} + - role: vz-admin + permission: + columns: + - asmp_level_desc + - asmp_level_id + filter: {} 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..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - city_id + - city_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -1,15 +1,6 @@ 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 permission: @@ -27,8 +18,7 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} -update_permissions: - - role: editor + - role: vz-admin 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..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 @@ -20,3 +20,12 @@ select_permissions: - eff_end_date - other filter: {} + - role: vz-admin + permission: + columns: + - contrib_factr_id + - contrib_factr_desc + - eff_beg_date + - eff_end_date + - other + filter: {} 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..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 @@ -14,3 +14,9 @@ select_permissions: - est_comp_cost_amount - est_comp_cost_id filter: {} + - role: vz-admin + permission: + columns: + - est_comp_cost_amount + - est_comp_cost_id + filter: {} 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..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 @@ -16,3 +16,10 @@ select_permissions: - est_comp_cost_amount - est_comp_cost_desc filter: {} + - role: vz-admin + permission: + columns: + - est_comp_cost_id + - est_comp_cost_amount + - est_comp_cost_desc + filter: {} 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..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 @@ -1,13 +1,6 @@ table: name: atd_txdot__ethnicity_lkp schema: public -insert_permissions: - - role: editor - permission: - check: {} - columns: - - ethnicity_desc - - ethnicity_id select_permissions: - role: editor permission: @@ -21,15 +14,9 @@ select_permissions: - ethnicity_desc - ethnicity_id filter: {} -update_permissions: - - role: editor + - role: vz-admin 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..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 @@ -1,13 +1,6 @@ table: name: atd_txdot__gndr_lkp schema: public -insert_permissions: - - role: editor - permission: - check: {} - columns: - - gndr_desc - - gndr_id select_permissions: - role: editor permission: @@ -21,15 +14,9 @@ select_permissions: - gndr_desc - gndr_id filter: {} -update_permissions: - - role: editor + - role: vz-admin 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..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 @@ -9,15 +9,6 @@ array_relationships: table: name: atd_txdot_person schema: public -insert_permissions: - - role: editor - permission: - check: {} - columns: - - injry_sev_id - - eff_beg_date - - eff_end_date - - injry_sev_desc select_permissions: - role: editor permission: @@ -33,8 +24,7 @@ select_permissions: - injry_sev_desc - injry_sev_id filter: {} -update_permissions: - - role: editor + - role: vz-admin permission: columns: - injry_sev_id @@ -42,4 +32,3 @@ update_permissions: - eff_end_date - injry_sev_desc filter: {} - check: null 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..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - intrsct_relat_id + - intrsct_relat_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -14,3 +14,9 @@ select_permissions: - light_cond_desc - light_cond_id filter: {} + - role: vz-admin + permission: + columns: + - light_cond_desc + - light_cond_id + filter: {} 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..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 @@ -14,3 +14,9 @@ select_permissions: - movement_id - movement_desc filter: {} + - role: vz-admin + permission: + columns: + - movement_id + - movement_desc + filter: {} 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..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - obj_struck_id + - obj_struck_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -14,3 +14,9 @@ select_permissions: - prsn_type_desc - prsn_type_id filter: {} + - role: vz-admin + permission: + columns: + - prsn_type_desc + - prsn_type_id + filter: {} 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..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - road_part_id + - road_part_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - road_type_id + - road_type_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - rwy_sys_id + - rwy_sys_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -10,3 +10,19 @@ 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: {} + - role: vz-admin + 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..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - traffic_cntl_id + - traffic_cntl_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -18,3 +18,11 @@ select_permissions: - eff_end_date - trvl_dir_desc filter: {} + - role: vz-admin + permission: + columns: + - trvl_dir_id + - trvl_dir_desc + - eff_beg_date + - eff_end_date + 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 aa9f26e12..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - veh_body_styl_id + - veh_body_styl_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - veh_make_id + - veh_make_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - veh_mod_id + - veh_mod_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -16,3 +16,11 @@ select_permissions: - veh_unit_desc_desc - veh_unit_desc_id filter: {} + - role: vz-admin + permission: + columns: + - 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 2fccbee02..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 @@ -18,3 +18,11 @@ select_permissions: - eff_beg_date - eff_end_date filter: {} + - role: vz-admin + permission: + columns: + - wthr_cond_id + - wthr_cond_desc + - eff_beg_date + - eff_end_date + filter: {} 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..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 @@ -14,3 +14,9 @@ select_permissions: - y_n_id - y_n_desc filter: {} + - role: vz-admin + permission: + columns: + - y_n_id + - y_n_desc + filter: {} 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..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 @@ -26,3 +26,15 @@ select_permissions: - update_timestamp - updated_by filter: {} + - role: vz-admin + permission: + columns: + - change_log_id + - id + - record_crash_id + - record_id + - record_json + - record_type + - update_timestamp + - updated_by + filter: {} 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..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 @@ -20,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 0d20364fa..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 @@ -42,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 a191015f3..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 @@ -30,3 +30,17 @@ select_permissions: - status_description filter: {} allow_aggregations: true + - 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 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..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 @@ -16,6 +16,20 @@ insert_permissions: - last_update - citation_nbr - updated_by + - 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 select_permissions: - role: editor permission: @@ -45,6 +59,20 @@ select_permissions: - citation_nbr - updated_by filter: {} + - 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: {} update_permissions: - role: editor permission: @@ -61,3 +89,18 @@ update_permissions: - updated_by filter: {} check: null + - 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 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..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 @@ -23,6 +23,17 @@ insert_permissions: - comments - last_update - is_retired + - role: vz-admin + permission: + check: {} + columns: + - crash_location_id + - crash_id + - location_id + - metadata + - comments + - last_update + - is_retired select_permissions: - role: editor permission: @@ -48,6 +59,18 @@ select_permissions: - location_id filter: {} allow_aggregations: true + - role: vz-admin + permission: + columns: + - comments + - crash_id + - is_retired + - last_update + - location_id + - metadata + - crash_location_id + filter: {} + allow_aggregations: true update_permissions: - role: editor permission: @@ -61,3 +84,15 @@ update_permissions: - location_id filter: {} check: null + - role: vz-admin + permission: + columns: + - is_retired + - last_update + - crash_id + - crash_location_id + - metadata + - comments + - location_id + filter: {} + check: null 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..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 @@ -18,3 +18,11 @@ select_permissions: - serious_injry_cnt - location_id filter: {} + - role: vz-admin + permission: + columns: + - apd_confirmed_death_count + - crashes + - serious_injry_cnt + - location_id + filter: {} 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..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 @@ -11,6 +11,15 @@ insert_permissions: - crash_status_id - description_long - description + - role: vz-admin + permission: + check: {} + columns: + - is_retired + - last_update + - crash_status_id + - description_long + - description select_permissions: - role: editor permission: @@ -30,6 +39,15 @@ select_permissions: - description_long - description filter: {} + - role: vz-admin + permission: + columns: + - is_retired + - last_update + - crash_status_id + - description_long + - description + filter: {} update_permissions: - role: editor permission: @@ -41,3 +59,13 @@ update_permissions: - description filter: {} check: null + - role: vz-admin + permission: + columns: + - is_retired + - last_update + - crash_status_id + - description_long + - description + filter: {} + check: null 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..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 @@ -343,6 +343,232 @@ insert_permissions: - wthr_cond_id - yield comment: "" + - 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: "" select_permissions: - role: editor permission: @@ -804,8 +1030,465 @@ select_permissions: - yield filter: {} allow_aggregations: true -update_permissions: - - role: editor + - 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 + - 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: editor + 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: 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 a0400d4f5..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 @@ -1,14 +1,6 @@ table: name: atd_txdot_geocoders schema: public -insert_permissions: - - role: editor - permission: - check: {} - columns: - - geocoder_id - - description - - name select_permissions: - role: editor permission: @@ -24,12 +16,10 @@ select_permissions: - description - name filter: {} -update_permissions: - - role: editor + - role: vz-admin 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..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 @@ -30,26 +30,6 @@ 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 permission: @@ -105,18 +85,23 @@ select_permissions: - street_level filter: {} allow_aggregations: true -update_permissions: - - role: editor + - role: vz-admin 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 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..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 @@ -71,6 +71,47 @@ object_relationships: schema: public insert_permissions: - role: editor + 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_gndr_id + - prsn_helmet_id + - prsn_injry_sev_id + - 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: vz-admin permission: check: {} columns: @@ -197,8 +238,94 @@ select_permissions: - years_of_life_lost filter: {} allow_aggregations: true + - 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_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 update_permissions: - role: editor + 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_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: vz-admin permission: columns: - crash_id 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..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 @@ -122,6 +122,52 @@ insert_permissions: - unit_nbr - unkn_injry_cnt - updated_by + - 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 select_permissions: - role: editor permission: @@ -217,6 +263,56 @@ select_permissions: - years_of_life_lost filter: {} allow_aggregations: true + - 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_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 + - 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 update_permissions: - role: editor permission: @@ -265,3 +361,53 @@ update_permissions: - updated_by filter: {} check: null + - 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_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 + - 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 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..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 @@ -1,44 +1,6 @@ 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 permission: @@ -114,42 +76,40 @@ select_permissions: - street_type - suffix_direction filter: {} -update_permissions: - - role: editor + - role: vz-admin 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: {} - 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 f30729d7b..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 @@ -185,6 +185,115 @@ insert_permissions: - veh_transp_name - veh_trvl_dir_id - vin + - 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 select_permissions: - role: editor permission: @@ -416,6 +525,125 @@ select_permissions: - veh_trvl_dir_id - vin filter: {} + - 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: {} update_permissions: - role: editor permission: @@ -538,3 +766,123 @@ update_permissions: - vin filter: {} check: null + - 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 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..d6699579c 100644 --- a/atd-vzd/metadata/databases/default/tables/public_crash_notes.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_crash_notes.yaml @@ -17,9 +17,20 @@ insert_permissions: - text - crash_id - user_email - - role: readonly + - role: vz-admin permission: check: {} + columns: + - id + - created_at + - updated_at + - date + - text + - crash_id + - user_email +select_permissions: + - role: editor + permission: columns: - crash_id - id @@ -28,8 +39,8 @@ insert_permissions: - created_at - date - updated_at -select_permissions: - - role: editor + filter: {} + - role: readonly permission: columns: - crash_id @@ -40,7 +51,7 @@ select_permissions: - date - updated_at filter: {} - - role: readonly + - role: vz-admin permission: columns: - crash_id @@ -64,22 +75,22 @@ update_permissions: - updated_at filter: {} check: null - - role: readonly + - role: vz-admin 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 permission: filter: {} - - role: readonly + - 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 10ce94459..77bcabc0f 100644 --- a/atd-vzd/metadata/databases/default/tables/public_location_notes.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_location_notes.yaml @@ -13,6 +13,17 @@ insert_permissions: - text - id - location_id + - role: vz-admin + permission: + check: {} + columns: + - date + - user_email + - created_at + - updated_at + - text + - id + - location_id select_permissions: - role: editor permission: @@ -36,6 +47,17 @@ select_permissions: - date - updated_at filter: {} + - role: vz-admin + permission: + columns: + - id + - location_id + - text + - user_email + - created_at + - date + - updated_at + filter: {} update_permissions: - role: editor permission: @@ -49,7 +71,22 @@ update_permissions: - updated_at filter: {} check: null + - role: vz-admin + permission: + columns: + - id + - location_id + - text + - user_email + - created_at + - date + - updated_at + filter: {} + check: null delete_permissions: - role: editor permission: filter: {} + - 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 d7201a70e..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 @@ -24,3 +24,14 @@ select_permissions: - location_id filter: {} allow_aggregations: true + - role: vz-admin + permission: + columns: + - description + - location_id + - crash_count + - total_est_comp_cost + - fatalities_count + - serious_injury_count + 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 fe3b37918..098a6e5d9 100644 --- a/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_recommendations.yaml @@ -28,6 +28,17 @@ insert_permissions: - rec_text - created_by - rec_update + - role: vz-admin + permission: + check: {} + columns: + - id + - created_at + - crash_id + - recommendation_status_id + - rec_text + - created_by + - rec_update select_permissions: - role: editor permission: @@ -40,7 +51,7 @@ select_permissions: - rec_update - created_at filter: {} - - role: readonly + - role: vz-admin permission: columns: - crash_id @@ -64,7 +75,22 @@ update_permissions: - created_at filter: {} check: {} + - role: vz-admin + permission: + columns: + - crash_id + - id + - recommendation_status_id + - created_by + - rec_text + - rec_update + - created_at + filter: {} + check: {} delete_permissions: - role: editor permission: filter: {} + - 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 4bbdd2a3a..379bee508 100644 --- a/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml +++ b/atd-vzd/metadata/databases/default/tables/public_recommendations_partners.yaml @@ -16,6 +16,13 @@ insert_permissions: - id - recommendation_id - partner_id + - role: vz-admin + permission: + check: {} + columns: + - id + - recommendation_id + - partner_id select_permissions: - role: editor permission: @@ -24,7 +31,7 @@ select_permissions: - partner_id - recommendation_id filter: {} - - role: readonly + - role: vz-admin permission: columns: - id @@ -40,7 +47,18 @@ update_permissions: - recommendation_id filter: {} check: {} + - role: vz-admin + permission: + columns: + - id + - partner_id + - recommendation_id + filter: {} + check: {} delete_permissions: - role: editor permission: filter: {} + - 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 3518d4165..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 @@ -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: "" 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..00566870d 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: "" 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..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 @@ -16,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 1146d719e..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 @@ -16,3 +16,10 @@ select_permissions: - location_id - veh_body_styl_desc filter: {} + - role: vz-admin + permission: + columns: + - 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 197a6741b..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 @@ -62,3 +62,33 @@ select_permissions: - location_id filter: {} allow_aggregations: true + - 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 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..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 @@ -20,3 +20,12 @@ select_permissions: - est_comp_cost - location_id filter: {} + - role: vz-admin + permission: + columns: + - location_id + - total_crashes + - total_deaths + - total_serious_injuries + - est_comp_cost + filter: {} diff --git a/atd-vze/package.json b/atd-vze/package.json index 2ae0cd585..d621e0749 100644 --- a/atd-vze/package.json +++ b/atd-vze/package.json @@ -1,6 +1,6 @@ { "name": "atd-vz-data", - "version": "1.42.1", + "version": "1.43.0", "homepage": "./", "description": "ATD Vision Zero Editor", "author": "ATD Data & Technology Services", diff --git a/atd-vze/src/Components/DataTable.js b/atd-vze/src/Components/DataTable.js index 796966fe8..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"; @@ -33,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); @@ -74,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; @@ -149,66 +145,95 @@ const DataTable = ({ }; const fieldValueDisplay = renderLookupDescString(); + const canClickToEdit = + !isReadOnlyUser && + fieldConfigObject.editable && + !isEditing; return ( - - + canClickToEdit && setEditField(field)} + style={{ + cursor: canClickToEdit ? "pointer" : "auto", + }} + > + {fieldLabel} - + {isEditing ? (
handleFieldUpdate(e, section.fields, field) } > - {fieldUiType === "select" && ( - handleInputChange(e)} - defaultValue={fieldValue} - type="select" - > - {selectOptions.map(option => ( -