mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-22 23:11:41 +03:00
06f5e4fb77
https://github.com/hasura/graphql-engine-mono/pull/1715 GitOrigin-RevId: 4818292cff8c3a5b264968e7032887a1e98b6f79
146 lines
2.5 KiB
YAML
146 lines
2.5 KiB
YAML
type: bulk
|
|
args:
|
|
|
|
- type: pg_track_table
|
|
args:
|
|
table: authors
|
|
|
|
- type: pg_track_table
|
|
args:
|
|
table: articles
|
|
|
|
- type: pg_create_select_permission
|
|
args:
|
|
table: authors
|
|
role: author
|
|
permission:
|
|
columns: "*"
|
|
filter:
|
|
id: X-Hasura-Author-Id
|
|
|
|
- type: pg_create_insert_permission
|
|
args:
|
|
table: authors
|
|
role: author
|
|
permission:
|
|
check:
|
|
id: X-Hasura-Author-Id
|
|
set:
|
|
id: X-Hasura-Author-Id
|
|
columns:
|
|
- first_name
|
|
- last_name
|
|
- phone
|
|
- age
|
|
- editor_id
|
|
|
|
- type: pg_create_update_permission
|
|
args:
|
|
table: authors
|
|
role: author
|
|
permission:
|
|
columns:
|
|
- first_name
|
|
- last_name
|
|
- phone
|
|
- age
|
|
- editor_id
|
|
filter:
|
|
id: X-Hasura-Author-Id
|
|
set:
|
|
updated_at: "NOW()"
|
|
|
|
- type: pg_create_update_permission
|
|
args:
|
|
table: authors
|
|
role: editor
|
|
permission:
|
|
columns:
|
|
- phone
|
|
- age
|
|
filter:
|
|
editor_id: X-Hasura-Editor-Id
|
|
set:
|
|
updated_at: "NOW()"
|
|
|
|
- type: pg_create_select_permission
|
|
args:
|
|
table: articles
|
|
role: guest
|
|
permission:
|
|
columns:
|
|
- title
|
|
- content
|
|
- author_id
|
|
allow_aggregations: true
|
|
filter:
|
|
is_published: true
|
|
|
|
- type: pg_create_select_permission
|
|
args:
|
|
table: articles
|
|
role: author
|
|
permission:
|
|
columns: "*"
|
|
allow_aggregations: true
|
|
filter:
|
|
author_id: X-Hasura-Author-Id
|
|
|
|
- type: pg_create_select_permission
|
|
args:
|
|
table: articles
|
|
role: editor
|
|
permission:
|
|
columns: "*"
|
|
filter:
|
|
editor_id: X-Hasura-Editor-Id
|
|
|
|
- type: pg_create_select_permission
|
|
args:
|
|
table: articles
|
|
role: free_user
|
|
permission:
|
|
columns:
|
|
- title
|
|
- content
|
|
filter:
|
|
is_published:
|
|
_eq: true
|
|
limit: 2
|
|
|
|
- type: pg_create_delete_permission
|
|
args:
|
|
table: articles
|
|
role: publisher
|
|
permission:
|
|
filter:
|
|
is_published:
|
|
_eq: true
|
|
|
|
- type: pg_create_update_permission
|
|
args:
|
|
table: articles
|
|
role: editor
|
|
permission:
|
|
columns:
|
|
- title
|
|
- content
|
|
filter:
|
|
editor_id: X-Hasura-Editor-Id
|
|
set:
|
|
updated_at: "NOW()"
|
|
|
|
- type: add_inherited_role
|
|
args:
|
|
role_name: author_editor
|
|
role_set:
|
|
- author
|
|
- editor
|
|
|
|
- type: add_inherited_role
|
|
args:
|
|
role_name: author_editor_publisher
|
|
role_set:
|
|
- author_editor
|
|
- publisher
|