1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 08:44:02 +00:00

Postgres RLS + permission controlled database managers (#33)

This PR adds Postgres RLS (trait manager + table manager approach) and permission controlled managers for PostgreSQL.

---------

Co-authored-by: lukinovec <lukinovec@gmail.com>
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
This commit is contained in:
Samuel Štancl 2024-04-24 22:32:49 +02:00 committed by GitHub
parent 34297d3e1a
commit 7317d2638a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 2511 additions and 112 deletions

View file

@ -22,13 +22,35 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Composer dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction
- name: Run tests
run: COLUMNS=200 ./vendor/bin/pest --compact --colors=always
if: ${{ ! env.ACT }}
run: COLUMNS=200 ./vendor/bin/pest -v --compact --colors=always
env:
DB_PASSWORD: password
DB_USERNAME: root
DB_DATABASE: main
TENANCY_TEST_MYSQL_HOST: mysql
TENANCY_TEST_PGSQL_HOST: postgres
TENANCY_TEST_REDIS_HOST: redis
TENANCY_TEST_SQLSRV_HOST: mssql
- name: Run tests (via act, no filter)
if: ${{ env.ACT && ! github.event.inputs.FILTER }}
run: COLUMNS=200 ./vendor/bin/pest -v --compact --colors=always
env:
DB_PASSWORD: password
DB_USERNAME: root
DB_DATABASE: main
TENANCY_TEST_MYSQL_HOST: mysql
TENANCY_TEST_PGSQL_HOST: postgres
TENANCY_TEST_REDIS_HOST: redis
TENANCY_TEST_SQLSRV_HOST: mssql
- name: Run tests (via act, FILTERED)
if: ${{ env.ACT && github.event.inputs.FILTER }}
run: COLUMNS=200 ./vendor/bin/pest -v --filter ${{ github.event.inputs.FILTER }} --compact --colors=always
env:
DB_PASSWORD: password
DB_USERNAME: root
@ -39,6 +61,7 @@ jobs:
TENANCY_TEST_SQLSRV_HOST: mssql
- name: Upload coverage to Codecov
if: ${{ !env.ACT }}
uses: codecov/codecov-action@v2
with:
token: 24382d15-84e7-4a55-bea4-c4df96a24a9b # todo it's fine if this is here in plaintext, but move this to GH secrets eventually