├── .gitignore ├── LICENSE ├── README.md ├── Vagrantfile ├── load_sample_data.sh ├── provision.sh ├── reset_api_schema.sh ├── resetdb.sh ├── run_performance_tests.sh ├── run_rls_tests.sh ├── sample_data.csv ├── setup_pgtap.sql ├── sql ├── api_schema.sql ├── big_sample_dataset.sql ├── data_schema.sql ├── functions.sql ├── main.sql ├── roles.sql └── small_rls_dataset.sql └── tests ├── performance └── main.sql └── rls ├── administrator_rls.sql ├── employee_rls.sql └── structure.sql /.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/README.md -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/Vagrantfile -------------------------------------------------------------------------------- /load_sample_data.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/load_sample_data.sh -------------------------------------------------------------------------------- /provision.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/provision.sh -------------------------------------------------------------------------------- /reset_api_schema.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/reset_api_schema.sh -------------------------------------------------------------------------------- /resetdb.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/resetdb.sh -------------------------------------------------------------------------------- /run_performance_tests.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/run_performance_tests.sh -------------------------------------------------------------------------------- /run_rls_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | sudo -u postgres pg_prove -d app tests/rls/*.sql 4 | -------------------------------------------------------------------------------- /sample_data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/sample_data.csv -------------------------------------------------------------------------------- /setup_pgtap.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/setup_pgtap.sql -------------------------------------------------------------------------------- /sql/api_schema.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/sql/api_schema.sql -------------------------------------------------------------------------------- /sql/big_sample_dataset.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/sql/big_sample_dataset.sql -------------------------------------------------------------------------------- /sql/data_schema.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/sql/data_schema.sql -------------------------------------------------------------------------------- /sql/functions.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/sql/functions.sql -------------------------------------------------------------------------------- /sql/main.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/sql/main.sql -------------------------------------------------------------------------------- /sql/roles.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/sql/roles.sql -------------------------------------------------------------------------------- /sql/small_rls_dataset.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/sql/small_rls_dataset.sql -------------------------------------------------------------------------------- /tests/performance/main.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/tests/performance/main.sql -------------------------------------------------------------------------------- /tests/rls/administrator_rls.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/tests/rls/administrator_rls.sql -------------------------------------------------------------------------------- /tests/rls/employee_rls.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/tests/rls/employee_rls.sql -------------------------------------------------------------------------------- /tests/rls/structure.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruslantalpa/postgrest-rls-example/HEAD/tests/rls/structure.sql --------------------------------------------------------------------------------