diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index c6890d45d..c8da4e4d9 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -3000,6 +3000,27 @@
+
+ rbac
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
responsibilitycenters
diff --git a/client/src/components/rbac-wrapper/rbac-defaults.js b/client/src/components/rbac-wrapper/rbac-defaults.js
index 21a2da827..826ddb184 100644
--- a/client/src/components/rbac-wrapper/rbac-defaults.js
+++ b/client/src/components/rbac-wrapper/rbac-defaults.js
@@ -19,23 +19,15 @@ export default {
"jobs:available-list": 2,
"jobs:create": 1,
"jobs:intake": 1,
- "jobs:line-edit": 3,
- "jobs:scoreboard-add": 3,
"jobs:close": 5,
- "jobs:documents-upload": 3,
- "jobs:documents-view": 2,
- "jobs:audit-trail": 5,
"jobs:detail": 1,
"invoices:enter": 2,
"invoices:view": 2,
"invoices:list": 2,
- "employees:rate": 5,
"employees:page": 5,
- "messaging:affix": 2,
-
"owners:list": 2,
"owners:detail": 3,
@@ -45,8 +37,6 @@ export default {
"production:board": 1,
"production:list": 1,
- "sendemail:send": 1,
-
"schedule:view": 2,
"scoreboard:view": 3,
diff --git a/client/src/components/shop-info/shop-info.component.jsx b/client/src/components/shop-info/shop-info.component.jsx
index a5e0116ff..6adc46e42 100644
--- a/client/src/components/shop-info/shop-info.component.jsx
+++ b/client/src/components/shop-info/shop-info.component.jsx
@@ -18,6 +18,7 @@ import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import ShopInfoIntakeChecklistComponent from "./shop-info.intake.component";
import ShopInfoSpeedPrint from "./shop-info.speedprint.component";
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
+import ShopInfoRbacComponent from "./shop-info.rbac.component";
export default function ShopInfoComponent({ form, saveLoading }) {
const { t } = useTranslation();
@@ -408,6 +409,9 @@ export default function ShopInfoComponent({ form, saveLoading }) {
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/client/src/graphql/bodyshop.queries.js b/client/src/graphql/bodyshop.queries.js
index 7b861fc03..ea4979d68 100644
--- a/client/src/graphql/bodyshop.queries.js
+++ b/client/src/graphql/bodyshop.queries.js
@@ -52,6 +52,7 @@ export const QUERY_BODYSHOP = gql`
speedprint
md_parts_locations
md_notes_presets
+ md_rbac
employees {
id
first_name
@@ -110,6 +111,7 @@ export const UPDATE_SHOP = gql`
speedprint
md_parts_locations
md_notes_presets
+ md_rbac
employees {
id
first_name
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 8a142fbaa..5c5b6ff58 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -186,6 +186,7 @@
"jobstatuses": "Job Statuses",
"notemplatesavailable": "No templates available to add.",
"orderstatuses": "Order Statuses",
+ "rbac": "Role Based Access Control",
"responsibilitycenters": {
"costs": "Cost Centers",
"profits": "Profit Centers",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index f58340302..d5eeeb57c 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -186,6 +186,7 @@
"jobstatuses": "",
"notemplatesavailable": "",
"orderstatuses": "",
+ "rbac": "",
"responsibilitycenters": {
"costs": "",
"profits": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index e92603bf0..b928498ea 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -186,6 +186,7 @@
"jobstatuses": "",
"notemplatesavailable": "",
"orderstatuses": "",
+ "rbac": "",
"responsibilitycenters": {
"costs": "",
"profits": "",
diff --git a/hasura/migrations/1597101073656_alter_table_public_bodyshops_add_column_md_rbac/down.yaml b/hasura/migrations/1597101073656_alter_table_public_bodyshops_add_column_md_rbac/down.yaml
new file mode 100644
index 000000000..b8211a7cb
--- /dev/null
+++ b/hasura/migrations/1597101073656_alter_table_public_bodyshops_add_column_md_rbac/down.yaml
@@ -0,0 +1,5 @@
+- args:
+ cascade: false
+ read_only: false
+ sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "md_rbac";
+ type: run_sql
diff --git a/hasura/migrations/1597101073656_alter_table_public_bodyshops_add_column_md_rbac/up.yaml b/hasura/migrations/1597101073656_alter_table_public_bodyshops_add_column_md_rbac/up.yaml
new file mode 100644
index 000000000..d5331b8e5
--- /dev/null
+++ b/hasura/migrations/1597101073656_alter_table_public_bodyshops_add_column_md_rbac/up.yaml
@@ -0,0 +1,5 @@
+- args:
+ cascade: false
+ read_only: false
+ sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "md_rbac" jsonb NULL;
+ type: run_sql
diff --git a/hasura/migrations/1597101084487_alter_table_public_bodyshops_alter_column_md_notes_presets/down.yaml b/hasura/migrations/1597101084487_alter_table_public_bodyshops_alter_column_md_notes_presets/down.yaml
new file mode 100644
index 000000000..b3f79f8ab
--- /dev/null
+++ b/hasura/migrations/1597101084487_alter_table_public_bodyshops_alter_column_md_notes_presets/down.yaml
@@ -0,0 +1,6 @@
+- args:
+ cascade: false
+ read_only: false
+ sql: ALTER TABLE "public"."bodyshops" ALTER COLUMN "md_notes_presets" DROP NOT
+ NULL;
+ type: run_sql
diff --git a/hasura/migrations/1597101084487_alter_table_public_bodyshops_alter_column_md_notes_presets/up.yaml b/hasura/migrations/1597101084487_alter_table_public_bodyshops_alter_column_md_notes_presets/up.yaml
new file mode 100644
index 000000000..b178e1e87
--- /dev/null
+++ b/hasura/migrations/1597101084487_alter_table_public_bodyshops_alter_column_md_notes_presets/up.yaml
@@ -0,0 +1,6 @@
+- args:
+ cascade: false
+ read_only: false
+ sql: ALTER TABLE "public"."bodyshops" ALTER COLUMN "md_notes_presets" SET NOT
+ NULL;
+ type: run_sql
diff --git a/hasura/migrations/1597101096084_alter_table_public_bodyshops_alter_column_md_messaging_presets/down.yaml b/hasura/migrations/1597101096084_alter_table_public_bodyshops_alter_column_md_messaging_presets/down.yaml
new file mode 100644
index 000000000..adbb75c64
--- /dev/null
+++ b/hasura/migrations/1597101096084_alter_table_public_bodyshops_alter_column_md_messaging_presets/down.yaml
@@ -0,0 +1,6 @@
+- args:
+ cascade: false
+ read_only: false
+ sql: ALTER TABLE "public"."bodyshops" ALTER COLUMN "md_messaging_presets" DROP
+ NOT NULL;
+ type: run_sql
diff --git a/hasura/migrations/1597101096084_alter_table_public_bodyshops_alter_column_md_messaging_presets/up.yaml b/hasura/migrations/1597101096084_alter_table_public_bodyshops_alter_column_md_messaging_presets/up.yaml
new file mode 100644
index 000000000..f734acf1d
--- /dev/null
+++ b/hasura/migrations/1597101096084_alter_table_public_bodyshops_alter_column_md_messaging_presets/up.yaml
@@ -0,0 +1,6 @@
+- args:
+ cascade: false
+ read_only: false
+ sql: ALTER TABLE "public"."bodyshops" ALTER COLUMN "md_messaging_presets" SET
+ NOT NULL;
+ type: run_sql
diff --git a/hasura/migrations/1597101103779_update_permission_user_public_table_bodyshops/down.yaml b/hasura/migrations/1597101103779_update_permission_user_public_table_bodyshops/down.yaml
new file mode 100644
index 000000000..00761bb0f
--- /dev/null
+++ b/hasura/migrations/1597101103779_update_permission_user_public_table_bodyshops/down.yaml
@@ -0,0 +1,60 @@
+- args:
+ role: user
+ table:
+ name: bodyshops
+ schema: public
+ type: drop_select_permission
+- args:
+ permission:
+ allow_aggregations: false
+ columns:
+ - accountingconfig
+ - address1
+ - address2
+ - appt_length
+ - city
+ - country
+ - created_at
+ - email
+ - federal_tax_id
+ - id
+ - inhousevendorid
+ - insurance_vendor_id
+ - intakechecklist
+ - invoice_tax_rates
+ - logo_img_path
+ - md_messaging_presets
+ - md_notes_presets
+ - md_order_statuses
+ - md_parts_locations
+ - md_referral_sources
+ - md_responsibility_centers
+ - md_ro_statuses
+ - messagingservicesid
+ - production_config
+ - region_config
+ - scoreboard_target
+ - shopname
+ - shoprates
+ - speedprint
+ - ssbuckets
+ - state
+ - state_tax_id
+ - stripe_acct_id
+ - template_header
+ - textid
+ - updated_at
+ - zip_post
+ computed_fields: []
+ filter:
+ associations:
+ bodyshop:
+ associations:
+ user:
+ authid:
+ _eq: X-Hasura-User-Id
+ role: user
+ table:
+ name: bodyshops
+ schema: public
+ type: create_select_permission
diff --git a/hasura/migrations/1597101103779_update_permission_user_public_table_bodyshops/up.yaml b/hasura/migrations/1597101103779_update_permission_user_public_table_bodyshops/up.yaml
new file mode 100644
index 000000000..66dc3a4da
--- /dev/null
+++ b/hasura/migrations/1597101103779_update_permission_user_public_table_bodyshops/up.yaml
@@ -0,0 +1,61 @@
+- args:
+ role: user
+ table:
+ name: bodyshops
+ schema: public
+ type: drop_select_permission
+- args:
+ permission:
+ allow_aggregations: false
+ columns:
+ - accountingconfig
+ - address1
+ - address2
+ - appt_length
+ - city
+ - country
+ - created_at
+ - email
+ - federal_tax_id
+ - id
+ - inhousevendorid
+ - insurance_vendor_id
+ - intakechecklist
+ - invoice_tax_rates
+ - logo_img_path
+ - md_messaging_presets
+ - md_notes_presets
+ - md_order_statuses
+ - md_parts_locations
+ - md_rbac
+ - md_referral_sources
+ - md_responsibility_centers
+ - md_ro_statuses
+ - messagingservicesid
+ - production_config
+ - region_config
+ - scoreboard_target
+ - shopname
+ - shoprates
+ - speedprint
+ - ssbuckets
+ - state
+ - state_tax_id
+ - stripe_acct_id
+ - template_header
+ - textid
+ - updated_at
+ - zip_post
+ computed_fields: []
+ filter:
+ associations:
+ bodyshop:
+ associations:
+ user:
+ authid:
+ _eq: X-Hasura-User-Id
+ role: user
+ table:
+ name: bodyshops
+ schema: public
+ type: create_select_permission
diff --git a/hasura/migrations/1597101110854_update_permission_user_public_table_bodyshops/down.yaml b/hasura/migrations/1597101110854_update_permission_user_public_table_bodyshops/down.yaml
new file mode 100644
index 000000000..172d0cfce
--- /dev/null
+++ b/hasura/migrations/1597101110854_update_permission_user_public_table_bodyshops/down.yaml
@@ -0,0 +1,54 @@
+- args:
+ role: user
+ table:
+ name: bodyshops
+ schema: public
+ type: drop_update_permission
+- args:
+ permission:
+ columns:
+ - accountingconfig
+ - address1
+ - address2
+ - appt_length
+ - city
+ - country
+ - created_at
+ - email
+ - federal_tax_id
+ - id
+ - inhousevendorid
+ - insurance_vendor_id
+ - intakechecklist
+ - invoice_tax_rates
+ - logo_img_path
+ - md_messaging_presets
+ - md_notes_presets
+ - md_order_statuses
+ - md_parts_locations
+ - md_referral_sources
+ - md_responsibility_centers
+ - md_ro_statuses
+ - production_config
+ - scoreboard_target
+ - shopname
+ - shoprates
+ - speedprint
+ - ssbuckets
+ - state
+ - state_tax_id
+ - updated_at
+ - zip_post
+ filter:
+ associations:
+ bodyshop:
+ associations:
+ user:
+ authid:
+ _eq: X-Hasura-User-Id
+ set: {}
+ role: user
+ table:
+ name: bodyshops
+ schema: public
+ type: create_update_permission
diff --git a/hasura/migrations/1597101110854_update_permission_user_public_table_bodyshops/up.yaml b/hasura/migrations/1597101110854_update_permission_user_public_table_bodyshops/up.yaml
new file mode 100644
index 000000000..2d3b1252f
--- /dev/null
+++ b/hasura/migrations/1597101110854_update_permission_user_public_table_bodyshops/up.yaml
@@ -0,0 +1,55 @@
+- args:
+ role: user
+ table:
+ name: bodyshops
+ schema: public
+ type: drop_update_permission
+- args:
+ permission:
+ columns:
+ - accountingconfig
+ - address1
+ - address2
+ - appt_length
+ - city
+ - country
+ - created_at
+ - email
+ - federal_tax_id
+ - id
+ - inhousevendorid
+ - insurance_vendor_id
+ - intakechecklist
+ - invoice_tax_rates
+ - logo_img_path
+ - md_messaging_presets
+ - md_notes_presets
+ - md_order_statuses
+ - md_parts_locations
+ - md_rbac
+ - md_referral_sources
+ - md_responsibility_centers
+ - md_ro_statuses
+ - production_config
+ - scoreboard_target
+ - shopname
+ - shoprates
+ - speedprint
+ - ssbuckets
+ - state
+ - state_tax_id
+ - updated_at
+ - zip_post
+ filter:
+ associations:
+ bodyshop:
+ associations:
+ user:
+ authid:
+ _eq: X-Hasura-User-Id
+ set: {}
+ role: user
+ table:
+ name: bodyshops
+ schema: public
+ type: create_update_permission
diff --git a/hasura/migrations/metadata.yaml b/hasura/migrations/metadata.yaml
index c1bfe743f..66d43f53b 100644
--- a/hasura/migrations/metadata.yaml
+++ b/hasura/migrations/metadata.yaml
@@ -478,6 +478,7 @@ tables:
- md_notes_presets
- md_order_statuses
- md_parts_locations
+ - md_rbac
- md_referral_sources
- md_responsibility_centers
- md_ro_statuses
@@ -526,6 +527,7 @@ tables:
- md_notes_presets
- md_order_statuses
- md_parts_locations
+ - md_rbac
- md_referral_sources
- md_responsibility_centers
- md_ro_statuses