From 88857800e6189684311b57b40b3ced94cd0d0fea Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Tue, 10 Dec 2019 17:18:58 -0800 Subject: [PATCH] Additional permissions based migrations. --- .../down.yaml | 6 ++ .../up.yaml | 34 ++++++++ .../down.yaml | 40 ++++++++++ .../up.yaml | 40 ++++++++++ .../down.yaml | 40 ++++++++++ .../up.yaml | 39 ++++++++++ .../down.yaml | 6 ++ .../up.yaml | 34 ++++++++ .../down.yaml | 6 ++ .../up.yaml | 77 +++++++++++++++++++ .../down.yaml | 6 ++ .../up.yaml | 75 ++++++++++++++++++ .../down.yaml | 6 ++ .../up.yaml | 76 ++++++++++++++++++ .../down.yaml | 6 ++ .../up.yaml | 16 ++++ .../down.yaml | 6 ++ .../up.yaml | 13 ++++ .../down.yaml | 6 ++ .../up.yaml | 35 +++++++++ .../down.yaml | 6 ++ .../up.yaml | 38 +++++++++ .../down.yaml | 6 ++ .../up.yaml | 16 ++++ .../down.yaml | 6 ++ .../up.yaml | 36 +++++++++ .../down.yaml | 6 ++ .../up.yaml | 22 ++++++ .../down.yaml | 6 ++ .../up.yaml | 32 ++++++++ .../down.yaml | 6 ++ .../up.yaml | 33 ++++++++ .../down.yaml | 6 ++ .../up.yaml | 16 ++++ 34 files changed, 802 insertions(+) create mode 100644 hasura/migrations/1576026461536_update_permission_user_public_table_bodyshops/down.yaml create mode 100644 hasura/migrations/1576026461536_update_permission_user_public_table_bodyshops/up.yaml create mode 100644 hasura/migrations/1576026582675_update_permission_user_public_table_bodyshops/down.yaml create mode 100644 hasura/migrations/1576026582675_update_permission_user_public_table_bodyshops/up.yaml create mode 100644 hasura/migrations/1576026751366_update_permission_user_public_table_bodyshops/down.yaml create mode 100644 hasura/migrations/1576026751366_update_permission_user_public_table_bodyshops/up.yaml create mode 100644 hasura/migrations/1576026882282_update_permission_user_public_table_bodyshops/down.yaml create mode 100644 hasura/migrations/1576026882282_update_permission_user_public_table_bodyshops/up.yaml create mode 100644 hasura/migrations/1576026931133_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1576026931133_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1576026955649_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1576026955649_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1576026973657_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1576026973657_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1576026979367_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1576026979367_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1576026999608_update_permission_user_public_table_masterdata/down.yaml create mode 100644 hasura/migrations/1576026999608_update_permission_user_public_table_masterdata/up.yaml create mode 100644 hasura/migrations/1576027033657_update_permission_user_public_table_owners/down.yaml create mode 100644 hasura/migrations/1576027033657_update_permission_user_public_table_owners/up.yaml create mode 100644 hasura/migrations/1576027044808_update_permission_user_public_table_owners/down.yaml create mode 100644 hasura/migrations/1576027044808_update_permission_user_public_table_owners/up.yaml create mode 100644 hasura/migrations/1576027050551_update_permission_user_public_table_owners/down.yaml create mode 100644 hasura/migrations/1576027050551_update_permission_user_public_table_owners/up.yaml create mode 100644 hasura/migrations/1576027068096_update_permission_user_public_table_owners/down.yaml create mode 100644 hasura/migrations/1576027068096_update_permission_user_public_table_owners/up.yaml create mode 100644 hasura/migrations/1576027104076_update_permission_user_public_table_vehicles/down.yaml create mode 100644 hasura/migrations/1576027104076_update_permission_user_public_table_vehicles/up.yaml create mode 100644 hasura/migrations/1576027112480_update_permission_user_public_table_vehicles/down.yaml create mode 100644 hasura/migrations/1576027112480_update_permission_user_public_table_vehicles/up.yaml create mode 100644 hasura/migrations/1576027119200_update_permission_user_public_table_vehicles/down.yaml create mode 100644 hasura/migrations/1576027119200_update_permission_user_public_table_vehicles/up.yaml create mode 100644 hasura/migrations/1576027123711_update_permission_user_public_table_vehicles/down.yaml create mode 100644 hasura/migrations/1576027123711_update_permission_user_public_table_vehicles/up.yaml diff --git a/hasura/migrations/1576026461536_update_permission_user_public_table_bodyshops/down.yaml b/hasura/migrations/1576026461536_update_permission_user_public_table_bodyshops/down.yaml new file mode 100644 index 000000000..8559c1bd2 --- /dev/null +++ b/hasura/migrations/1576026461536_update_permission_user_public_table_bodyshops/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_select_permission diff --git a/hasura/migrations/1576026461536_update_permission_user_public_table_bodyshops/up.yaml b/hasura/migrations/1576026461536_update_permission_user_public_table_bodyshops/up.yaml new file mode 100644 index 000000000..f880085fd --- /dev/null +++ b/hasura/migrations/1576026461536_update_permission_user_public_table_bodyshops/up.yaml @@ -0,0 +1,34 @@ +- args: + permission: + allow_aggregations: false + columns: + - id + - shopname + - created_at + - updated_at + - address1 + - address2 + - city + - state + - zip_post + - country + - email + - federal_tax_id + - insurance_vendor_id + - state_tax_id + - logo_img_path + filter: + _and: + - associations: + user: + authid: + _eq: X-Hasura-User-Id + - associations: + active: + _eq: true + limit: null + role: user + table: + name: bodyshops + schema: public + type: create_select_permission diff --git a/hasura/migrations/1576026582675_update_permission_user_public_table_bodyshops/down.yaml b/hasura/migrations/1576026582675_update_permission_user_public_table_bodyshops/down.yaml new file mode 100644 index 000000000..e590073ac --- /dev/null +++ b/hasura/migrations/1576026582675_update_permission_user_public_table_bodyshops/down.yaml @@ -0,0 +1,40 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - id + - shopname + - created_at + - updated_at + - address1 + - address2 + - city + - state + - zip_post + - country + - email + - federal_tax_id + - insurance_vendor_id + - state_tax_id + - logo_img_path + computed_fields: [] + filter: + _and: + - associations: + user: + authid: + _eq: X-Hasura-User-Id + - associations: + active: + _eq: true + role: user + table: + name: bodyshops + schema: public + type: create_select_permission diff --git a/hasura/migrations/1576026582675_update_permission_user_public_table_bodyshops/up.yaml b/hasura/migrations/1576026582675_update_permission_user_public_table_bodyshops/up.yaml new file mode 100644 index 000000000..49abf772b --- /dev/null +++ b/hasura/migrations/1576026582675_update_permission_user_public_table_bodyshops/up.yaml @@ -0,0 +1,40 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - id + - shopname + - created_at + - updated_at + - address1 + - address2 + - city + - state + - zip_post + - country + - email + - federal_tax_id + - insurance_vendor_id + - state_tax_id + - logo_img_path + computed_fields: [] + filter: + associations: + user: + _and: + - authid: + _eq: X-Hasura-User-Id + - associations: + active: + _eq: true + role: user + table: + name: bodyshops + schema: public + type: create_select_permission diff --git a/hasura/migrations/1576026751366_update_permission_user_public_table_bodyshops/down.yaml b/hasura/migrations/1576026751366_update_permission_user_public_table_bodyshops/down.yaml new file mode 100644 index 000000000..49abf772b --- /dev/null +++ b/hasura/migrations/1576026751366_update_permission_user_public_table_bodyshops/down.yaml @@ -0,0 +1,40 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - id + - shopname + - created_at + - updated_at + - address1 + - address2 + - city + - state + - zip_post + - country + - email + - federal_tax_id + - insurance_vendor_id + - state_tax_id + - logo_img_path + computed_fields: [] + filter: + associations: + user: + _and: + - authid: + _eq: X-Hasura-User-Id + - associations: + active: + _eq: true + role: user + table: + name: bodyshops + schema: public + type: create_select_permission diff --git a/hasura/migrations/1576026751366_update_permission_user_public_table_bodyshops/up.yaml b/hasura/migrations/1576026751366_update_permission_user_public_table_bodyshops/up.yaml new file mode 100644 index 000000000..3cbdf35a3 --- /dev/null +++ b/hasura/migrations/1576026751366_update_permission_user_public_table_bodyshops/up.yaml @@ -0,0 +1,39 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - id + - shopname + - created_at + - updated_at + - address1 + - address2 + - city + - state + - zip_post + - country + - email + - federal_tax_id + - insurance_vendor_id + - state_tax_id + - logo_img_path + computed_fields: [] + filter: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + role: user + table: + name: bodyshops + schema: public + type: create_select_permission diff --git a/hasura/migrations/1576026882282_update_permission_user_public_table_bodyshops/down.yaml b/hasura/migrations/1576026882282_update_permission_user_public_table_bodyshops/down.yaml new file mode 100644 index 000000000..0c08e2319 --- /dev/null +++ b/hasura/migrations/1576026882282_update_permission_user_public_table_bodyshops/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_update_permission diff --git a/hasura/migrations/1576026882282_update_permission_user_public_table_bodyshops/up.yaml b/hasura/migrations/1576026882282_update_permission_user_public_table_bodyshops/up.yaml new file mode 100644 index 000000000..849d36b02 --- /dev/null +++ b/hasura/migrations/1576026882282_update_permission_user_public_table_bodyshops/up.yaml @@ -0,0 +1,34 @@ +- args: + permission: + columns: + - address1 + - address2 + - city + - country + - created_at + - email + - federal_tax_id + - insurance_vendor_id + - logo_img_path + - shopname + - state + - state_tax_id + - updated_at + - zip_post + filter: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: bodyshops + schema: public + type: create_update_permission diff --git a/hasura/migrations/1576026931133_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1576026931133_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..30afb6bd8 --- /dev/null +++ b/hasura/migrations/1576026931133_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_insert_permission diff --git a/hasura/migrations/1576026931133_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1576026931133_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..fb514ccf0 --- /dev/null +++ b/hasura/migrations/1576026931133_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,77 @@ +- args: + permission: + allow_upsert: true + check: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + columns: + - actual_completion + - actual_delivery + - actual_in + - created_at + - est_addr1 + - est_addr2 + - est_city + - est_co_nm + - est_ct_fn + - est_ct_ln + - est_ctry + - est_ea + - est_number + - est_ph1 + - est_st + - est_zip + - federal_tax_rate + - invoice_date + - labor_rate_desc + - labor_rate_id + - local_tax_rate + - ownerid + - rate_atp + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_lab + - rate_lad + - rate_lae + - rate_laf + - rate_lag + - rate_lam + - rate_lar + - rate_las + - rate_lau + - rate_ma2s + - rate_ma2t + - rate_ma3s + - rate_mabl + - rate_macs + - rate_mahw + - rate_mapa + - rate_mash + - rate_matd + - regie_number + - ro_number + - scheduled_completion + - scheduled_delivery + - scheduled_in + - shopid + - state_tax_rate + - status + - updated_at + - vehicleid + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1576026955649_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1576026955649_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..042242267 --- /dev/null +++ b/hasura/migrations/1576026955649_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission diff --git a/hasura/migrations/1576026955649_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1576026955649_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..8e3cb9305 --- /dev/null +++ b/hasura/migrations/1576026955649_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,75 @@ +- args: + permission: + allow_aggregations: false + columns: + - invoice_date + - federal_tax_rate + - local_tax_rate + - rate_atp + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_lab + - rate_lad + - rate_lae + - rate_laf + - rate_lag + - rate_lam + - rate_lar + - rate_las + - rate_lau + - rate_ma2s + - rate_ma2t + - rate_ma3s + - rate_mabl + - rate_macs + - rate_mahw + - rate_mapa + - rate_mash + - rate_matd + - state_tax_rate + - est_addr1 + - est_addr2 + - est_city + - est_co_nm + - est_ct_fn + - est_ct_ln + - est_ctry + - est_ea + - est_number + - est_ph1 + - est_st + - est_zip + - labor_rate_desc + - labor_rate_id + - regie_number + - ro_number + - status + - actual_completion + - actual_delivery + - actual_in + - scheduled_completion + - scheduled_delivery + - scheduled_in + - created_at + - updated_at + - id + - ownerid + - shopid + - vehicleid + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + limit: null + role: user + table: + name: jobs + schema: public + type: create_select_permission diff --git a/hasura/migrations/1576026973657_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1576026973657_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..8bb0759ac --- /dev/null +++ b/hasura/migrations/1576026973657_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_update_permission diff --git a/hasura/migrations/1576026973657_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1576026973657_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..655fa9994 --- /dev/null +++ b/hasura/migrations/1576026973657_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,76 @@ +- args: + permission: + columns: + - actual_completion + - actual_delivery + - actual_in + - created_at + - est_addr1 + - est_addr2 + - est_city + - est_co_nm + - est_ct_fn + - est_ct_ln + - est_ctry + - est_ea + - est_number + - est_ph1 + - est_st + - est_zip + - federal_tax_rate + - invoice_date + - labor_rate_desc + - labor_rate_id + - local_tax_rate + - ownerid + - rate_atp + - rate_la1 + - rate_la2 + - rate_la3 + - rate_la4 + - rate_lab + - rate_lad + - rate_lae + - rate_laf + - rate_lag + - rate_lam + - rate_lar + - rate_las + - rate_lau + - rate_ma2s + - rate_ma2t + - rate_ma3s + - rate_mabl + - rate_macs + - rate_mahw + - rate_mapa + - rate_mash + - rate_matd + - regie_number + - ro_number + - scheduled_completion + - scheduled_delivery + - scheduled_in + - shopid + - state_tax_rate + - status + - updated_at + - vehicleid + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_update_permission diff --git a/hasura/migrations/1576026979367_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1576026979367_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..e1abc5cdb --- /dev/null +++ b/hasura/migrations/1576026979367_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_delete_permission diff --git a/hasura/migrations/1576026979367_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1576026979367_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..b9b46a6ca --- /dev/null +++ b/hasura/migrations/1576026979367_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,16 @@ +- args: + permission: + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + role: user + table: + name: jobs + schema: public + type: create_delete_permission diff --git a/hasura/migrations/1576026999608_update_permission_user_public_table_masterdata/down.yaml b/hasura/migrations/1576026999608_update_permission_user_public_table_masterdata/down.yaml new file mode 100644 index 000000000..2bd7ff797 --- /dev/null +++ b/hasura/migrations/1576026999608_update_permission_user_public_table_masterdata/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: masterdata + schema: public + type: drop_select_permission diff --git a/hasura/migrations/1576026999608_update_permission_user_public_table_masterdata/up.yaml b/hasura/migrations/1576026999608_update_permission_user_public_table_masterdata/up.yaml new file mode 100644 index 000000000..8ac525b23 --- /dev/null +++ b/hasura/migrations/1576026999608_update_permission_user_public_table_masterdata/up.yaml @@ -0,0 +1,13 @@ +- args: + permission: + allow_aggregations: false + columns: + - key + - value + filter: {} + limit: null + role: user + table: + name: masterdata + schema: public + type: create_select_permission diff --git a/hasura/migrations/1576027033657_update_permission_user_public_table_owners/down.yaml b/hasura/migrations/1576027033657_update_permission_user_public_table_owners/down.yaml new file mode 100644 index 000000000..9f10ffd44 --- /dev/null +++ b/hasura/migrations/1576027033657_update_permission_user_public_table_owners/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: owners + schema: public + type: drop_select_permission diff --git a/hasura/migrations/1576027033657_update_permission_user_public_table_owners/up.yaml b/hasura/migrations/1576027033657_update_permission_user_public_table_owners/up.yaml new file mode 100644 index 000000000..8eb088bde --- /dev/null +++ b/hasura/migrations/1576027033657_update_permission_user_public_table_owners/up.yaml @@ -0,0 +1,35 @@ +- args: + permission: + allow_aggregations: false + columns: + - id + - created_at + - updated_at + - first_name + - last_name + - address1 + - address2 + - city + - state + - zip + - country + - email + - phone + - preferred_contact + - allow_text_message + - shopid + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + limit: null + role: user + table: + name: owners + schema: public + type: create_select_permission diff --git a/hasura/migrations/1576027044808_update_permission_user_public_table_owners/down.yaml b/hasura/migrations/1576027044808_update_permission_user_public_table_owners/down.yaml new file mode 100644 index 000000000..915b657e4 --- /dev/null +++ b/hasura/migrations/1576027044808_update_permission_user_public_table_owners/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: owners + schema: public + type: drop_insert_permission diff --git a/hasura/migrations/1576027044808_update_permission_user_public_table_owners/up.yaml b/hasura/migrations/1576027044808_update_permission_user_public_table_owners/up.yaml new file mode 100644 index 000000000..fbaa51189 --- /dev/null +++ b/hasura/migrations/1576027044808_update_permission_user_public_table_owners/up.yaml @@ -0,0 +1,38 @@ +- args: + permission: + allow_upsert: true + check: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + columns: + - allow_text_message + - address1 + - address2 + - city + - country + - email + - first_name + - last_name + - phone + - preferred_contact + - state + - zip + - created_at + - updated_at + - id + - shopid + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: owners + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1576027050551_update_permission_user_public_table_owners/down.yaml b/hasura/migrations/1576027050551_update_permission_user_public_table_owners/down.yaml new file mode 100644 index 000000000..d53d96596 --- /dev/null +++ b/hasura/migrations/1576027050551_update_permission_user_public_table_owners/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: owners + schema: public + type: drop_delete_permission diff --git a/hasura/migrations/1576027050551_update_permission_user_public_table_owners/up.yaml b/hasura/migrations/1576027050551_update_permission_user_public_table_owners/up.yaml new file mode 100644 index 000000000..2983aad0e --- /dev/null +++ b/hasura/migrations/1576027050551_update_permission_user_public_table_owners/up.yaml @@ -0,0 +1,16 @@ +- args: + permission: + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + role: user + table: + name: owners + schema: public + type: create_delete_permission diff --git a/hasura/migrations/1576027068096_update_permission_user_public_table_owners/down.yaml b/hasura/migrations/1576027068096_update_permission_user_public_table_owners/down.yaml new file mode 100644 index 000000000..b94959d43 --- /dev/null +++ b/hasura/migrations/1576027068096_update_permission_user_public_table_owners/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: owners + schema: public + type: drop_update_permission diff --git a/hasura/migrations/1576027068096_update_permission_user_public_table_owners/up.yaml b/hasura/migrations/1576027068096_update_permission_user_public_table_owners/up.yaml new file mode 100644 index 000000000..abfb7676a --- /dev/null +++ b/hasura/migrations/1576027068096_update_permission_user_public_table_owners/up.yaml @@ -0,0 +1,36 @@ +- args: + permission: + columns: + - address1 + - address2 + - allow_text_message + - city + - country + - created_at + - email + - first_name + - last_name + - phone + - preferred_contact + - shopid + - state + - updated_at + - zip + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: owners + schema: public + type: create_update_permission diff --git a/hasura/migrations/1576027104076_update_permission_user_public_table_vehicles/down.yaml b/hasura/migrations/1576027104076_update_permission_user_public_table_vehicles/down.yaml new file mode 100644 index 000000000..145e5dcdf --- /dev/null +++ b/hasura/migrations/1576027104076_update_permission_user_public_table_vehicles/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: vehicles + schema: public + type: drop_insert_permission diff --git a/hasura/migrations/1576027104076_update_permission_user_public_table_vehicles/up.yaml b/hasura/migrations/1576027104076_update_permission_user_public_table_vehicles/up.yaml new file mode 100644 index 000000000..75a6bedb4 --- /dev/null +++ b/hasura/migrations/1576027104076_update_permission_user_public_table_vehicles/up.yaml @@ -0,0 +1,22 @@ +- args: + permission: + allow_upsert: true + check: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + columns: [] + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: vehicles + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1576027112480_update_permission_user_public_table_vehicles/down.yaml b/hasura/migrations/1576027112480_update_permission_user_public_table_vehicles/down.yaml new file mode 100644 index 000000000..0d775176a --- /dev/null +++ b/hasura/migrations/1576027112480_update_permission_user_public_table_vehicles/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: vehicles + schema: public + type: drop_select_permission diff --git a/hasura/migrations/1576027112480_update_permission_user_public_table_vehicles/up.yaml b/hasura/migrations/1576027112480_update_permission_user_public_table_vehicles/up.yaml new file mode 100644 index 000000000..97269d3fd --- /dev/null +++ b/hasura/migrations/1576027112480_update_permission_user_public_table_vehicles/up.yaml @@ -0,0 +1,32 @@ +- args: + permission: + allow_aggregations: false + columns: + - created_at + - id + - plate_no + - shopid + - updated_at + - v_bstyle + - v_color + - v_engine + - v_make_desc + - v_model_desc + - v_model_yr + - v_paint_codes + - v_vin + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + limit: null + role: user + table: + name: vehicles + schema: public + type: create_select_permission diff --git a/hasura/migrations/1576027119200_update_permission_user_public_table_vehicles/down.yaml b/hasura/migrations/1576027119200_update_permission_user_public_table_vehicles/down.yaml new file mode 100644 index 000000000..394f3940d --- /dev/null +++ b/hasura/migrations/1576027119200_update_permission_user_public_table_vehicles/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: vehicles + schema: public + type: drop_update_permission diff --git a/hasura/migrations/1576027119200_update_permission_user_public_table_vehicles/up.yaml b/hasura/migrations/1576027119200_update_permission_user_public_table_vehicles/up.yaml new file mode 100644 index 000000000..43129fe54 --- /dev/null +++ b/hasura/migrations/1576027119200_update_permission_user_public_table_vehicles/up.yaml @@ -0,0 +1,33 @@ +- args: + permission: + columns: + - created_at + - plate_no + - shopid + - updated_at + - v_bstyle + - v_color + - v_engine + - v_make_desc + - v_model_desc + - v_model_yr + - v_paint_codes + - v_vin + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: vehicles + schema: public + type: create_update_permission diff --git a/hasura/migrations/1576027123711_update_permission_user_public_table_vehicles/down.yaml b/hasura/migrations/1576027123711_update_permission_user_public_table_vehicles/down.yaml new file mode 100644 index 000000000..8033cffd5 --- /dev/null +++ b/hasura/migrations/1576027123711_update_permission_user_public_table_vehicles/down.yaml @@ -0,0 +1,6 @@ +- args: + role: user + table: + name: vehicles + schema: public + type: drop_delete_permission diff --git a/hasura/migrations/1576027123711_update_permission_user_public_table_vehicles/up.yaml b/hasura/migrations/1576027123711_update_permission_user_public_table_vehicles/up.yaml new file mode 100644 index 000000000..9a333f12e --- /dev/null +++ b/hasura/migrations/1576027123711_update_permission_user_public_table_vehicles/up.yaml @@ -0,0 +1,16 @@ +- args: + permission: + filter: + bodyshop: + associations: + _and: + - user: + authid: + _eq: X-Hasura-User-Id + - active: + _eq: true + role: user + table: + name: vehicles + schema: public + type: create_delete_permission