graphql-engine/server/tests-py/queries/unauthorized_role/setup.yaml
Swann Moreau 5bc0355bdd [server] coalesce multiple run_sql calls in tests (#270)
GitOrigin-RevId: abd7303aaf8e7a8739fd10574249aec450082ef8
2021-01-06 16:07:22 +00:00

28 lines
494 B
YAML

type: bulk
args:
- 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')
;
- 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