Added deleting of custom templates for BOD-85.

This commit is contained in:
Patrick Fic
2020-05-12 10:25:36 -07:00
parent b518f84f5f
commit 6fd485c2fe
21 changed files with 770 additions and 307 deletions

View File

@@ -0,0 +1,6 @@
- args:
role: user
table:
name: templates
schema: public
type: drop_insert_permission

View File

@@ -0,0 +1,29 @@
- args:
permission:
allow_upsert: true
check:
_or:
- bodyshopid:
_is_null: true
- bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- bodyshopid
- html
- name
- query
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: templates
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,6 @@
- args:
role: user
table:
name: templates
schema: public
type: drop_delete_permission

View File

@@ -0,0 +1,19 @@
- args:
permission:
filter:
_or:
- bodyshopid:
_is_null: false
- bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: templates
schema: public
type: create_delete_permission

View File

@@ -2991,6 +2991,26 @@ tables:
- name: bodyshop
using:
foreign_key_constraint_on: bodyshopid
insert_permissions:
- role: user
permission:
check:
_or:
- bodyshopid:
_is_null: true
- bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- bodyshopid
- html
- name
- query
select_permissions:
- role: user
permission:
@@ -3037,6 +3057,21 @@ tables:
_eq: X-Hasura-User-Id
- active:
_eq: true
delete_permissions:
- role: user
permission:
filter:
_or:
- bodyshopid:
_is_null: false
- bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
- table:
schema: public
name: timetickets