graphql-engine/server/tests-py/queries/unauthorized_role/setup.yaml

28 lines
494 B
YAML
Raw Normal View History

2020-05-05 22:57:17 +03:00
type: bulk
args:
2020-05-05 22:57:17 +03:00
- type: run_sql
args:
sql: |
CREATE TABLE "user"(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL UNIQUE
);
INSERT INTO "user" (name)
VALUES ('admin'), ('user'), ('anonymous')
;
2020-05-05 22:57:17 +03:00
- type: track_table
args:
name: user
schema: public
# define permission for anonymous role
- type: create_select_permission
args:
table: user
role: anonymous
permission:
columns: '*'
filter:
name: anonymous