2021-10-01 15:52:19 +03:00
|
|
|
type: bulk
|
|
|
|
args:
|
2022-01-11 16:36:02 +03:00
|
|
|
# Track tables
|
2021-10-01 15:52:19 +03:00
|
|
|
- type: mssql_track_table
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table:
|
|
|
|
name: author
|
|
|
|
- type: mssql_track_table
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table:
|
|
|
|
name: article
|
2022-01-11 16:36:02 +03:00
|
|
|
|
|
|
|
# Permissions for user on article
|
2021-10-01 15:52:19 +03:00
|
|
|
- type: mssql_create_insert_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
role: user
|
|
|
|
permission:
|
|
|
|
check:
|
|
|
|
author_id: X-Hasura-User-Id
|
|
|
|
columns:
|
|
|
|
- title
|
|
|
|
- content
|
|
|
|
- author_id
|
2022-01-11 16:36:02 +03:00
|
|
|
|
|
|
|
# Permissions for user_with_select_and_insert on article
|
|
|
|
- type: mssql_create_insert_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
role: user_with_select_and_insert
|
|
|
|
permission:
|
|
|
|
check:
|
|
|
|
author_id: X-Hasura-User-Id
|
|
|
|
columns: '*'
|
|
|
|
- type: mssql_create_select_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table: article
|
2022-02-03 17:14:33 +03:00
|
|
|
role: user_with_select_and_insert
|
2022-01-11 16:36:02 +03:00
|
|
|
permission:
|
|
|
|
columns: '*'
|
|
|
|
filter:
|
|
|
|
$or:
|
|
|
|
- author_id: X-Hasura-User-Id
|
|
|
|
- is_published: 1
|
|
|
|
|
|
|
|
# Permissions for user_with_update_and_insert on article
|
|
|
|
- type: mssql_create_insert_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
role: user_with_update_and_insert
|
|
|
|
permission:
|
|
|
|
check:
|
|
|
|
author_id: X-Hasura-User-Id
|
|
|
|
columns: '*'
|
|
|
|
- type: mssql_create_update_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
role: user_with_update_and_insert
|
|
|
|
permission:
|
|
|
|
filter:
|
|
|
|
author_id: X-Hasura-User-Id
|
|
|
|
columns: '*'
|
|
|
|
|
|
|
|
# Permissions for user_with_all_perms on article
|
|
|
|
- type: mssql_create_select_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table: article
|
|
|
|
role: user_with_all_perms
|
|
|
|
permission:
|
|
|
|
columns: '*'
|
|
|
|
filter:
|
|
|
|
$or:
|
|
|
|
- author_id: X-Hasura-User-Id
|
|
|
|
- is_published: 1
|
|
|
|
- type: mssql_create_insert_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
role: user_with_all_perms
|
|
|
|
permission:
|
|
|
|
check:
|
|
|
|
author_id: X-Hasura-User-Id
|
|
|
|
columns: '*'
|
|
|
|
- type: mssql_create_update_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
role: user_with_all_perms
|
|
|
|
permission:
|
|
|
|
filter:
|
|
|
|
author_id: X-Hasura-User-Id
|
|
|
|
columns: '*'
|
|
|
|
|
|
|
|
# Permissions for restricted on article
|
|
|
|
- type: mssql_create_select_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table: article
|
|
|
|
role: restricted
|
|
|
|
permission:
|
|
|
|
columns: '*'
|
|
|
|
filter:
|
|
|
|
$or:
|
|
|
|
- author_id: X-Hasura-User-Id
|
|
|
|
- is_published: 1
|
|
|
|
- type: mssql_create_insert_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
role: restricted
|
|
|
|
permission:
|
|
|
|
check:
|
|
|
|
author_id: X-Hasura-User-Id
|
|
|
|
- type: mssql_create_update_permission
|
|
|
|
args:
|
|
|
|
source: mssql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
role: restricted
|
|
|
|
permission:
|
|
|
|
filter:
|
|
|
|
author_id: X-Hasura-User-Id
|
|
|
|
columns: []
|