mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-07 15:24:03 +00:00
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>
21 lines
639 B
PHP
21 lines
639 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Stancl\Tenancy\Database\Concerns;
|
|
|
|
/**
|
|
* Interface indicating that the queries of the model it's used on
|
|
* get scoped using RLS (instead of the global TenantScope).
|
|
*
|
|
* All models whose queries you want to scope using RLS
|
|
* need to implement this interface if RLS scoping is explicit (= when TraitRLSManager::$implicitRLS is false).
|
|
* The models also have to use one of the single-database traits.
|
|
*
|
|
* Used with Postgres RLS via TraitRLSManager.
|
|
*
|
|
* @see \Stancl\Tenancy\RLS\PolicyManagers\TraitRLSManager
|
|
* @see BelongsToTenant
|
|
* @see BelongsToPrimaryModel
|
|
*/
|
|
interface RLSModel {}
|