1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 18:54:03 +00:00
Commit graph

785 commits

Author SHA1 Message Date
lukinovec
00af2d6eaf Check for class traits instead of the DB columns 2023-06-15 09:32:25 +02:00
lukinovec
c31340bff0 Only grant the permissions from the static property in the user creation job 2023-06-14 08:30:33 +02:00
lukinovec
73144a874a Use new static instead of checking class_implements() 2023-06-14 08:27:40 +02:00
PHP CS Fixer
f0faf41522 Fix code style (php-cs-fixer) 2023-06-07 13:01:53 +00:00
lukinovec
ac00f03273 Move model-related things from Tenancy to a trait 2023-06-07 14:45:36 +02:00
PHP CS Fixer
a5a9f1431e Fix code style (php-cs-fixer) 2023-06-07 11:59:10 +00:00
lukinovec
b7c24ef4ab Rename RLSModel 2023-06-07 13:58:47 +02:00
PHP CS Fixer
f37a29f592 Fix code style (php-cs-fixer) 2023-06-07 11:56:08 +00:00
lukinovec
fa43d8ae1d Rename RLSModel to RlsModel, fix global scope test 2023-06-07 13:55:43 +02:00
lukinovec
f84e3ffc02 Put DB statements into transaction 2023-06-07 11:00:28 +02:00
lukinovec
6bd23d5e3e Simplify CreateRLSPoliciesForTenantTables 2023-06-07 10:03:53 +02:00
PHP CS Fixer
1bc6885a4c Fix code style (php-cs-fixer) 2023-06-07 07:41:48 +00:00
lukinovec
bc28b0c2ed Add RLSModel interface, update BelongsToTenant 2023-06-07 09:37:32 +02:00
PHP CS Fixer
b3d9090284 Fix code style (php-cs-fixer) 2023-06-06 13:48:32 +00:00
lukinovec
4175ac07bd Rework model discovery 2023-06-06 15:46:50 +02:00
PHP CS Fixer
3bfef9e2c4 Fix code style (php-cs-fixer) 2023-06-05 14:36:19 +00:00
lukinovec
cc28d1813a Move reusable methods to Tenancy, get rid of tenancy.models.rls 2023-06-05 16:35:16 +02:00
lukinovec
bad5c693ab Add config('tenancy.database.rls') 2023-06-05 16:33:26 +02:00
lukinovec
cb775a9fba Improve RLS policy creation command 2023-06-05 13:43:21 +02:00
PHP CS Fixer
9f166a59a4 Fix code style (php-cs-fixer) 2023-06-05 10:04:15 +00:00
lukinovec
983e4c1f84 Get RLS models from a temporary tenant 2023-06-05 12:03:48 +02:00
lukinovec
5754f8bdc4 Get central connection name from the config 2023-06-05 10:08:48 +02:00
lukinovec
12b36f407d Rename bootstrapper, improve docblock 2023-06-01 10:26:39 +02:00
lukinovec
5b07afcc33 Improve comment 2023-05-31 13:44:22 +02:00
lukinovec
ac6bf3651a Delete redundant str($x)->toString() 2023-05-31 13:33:37 +02:00
lukinovec
61519ecec3 Wrap makeModelUseRls() in transaction 2023-05-31 07:53:21 +02:00
lukinovec
3ef1c38414 Delete single-call DB transactions 2023-05-31 07:38:43 +02:00
lukinovec
8ccc27e8c3 Rename bootstrapper 2023-05-29 11:15:38 +02:00
lukinovec
47fe86c21e Use DB transactions 2023-05-24 14:57:06 +02:00
lukinovec
ea9690f915 Handle phpstan errors 2023-05-24 14:47:17 +02:00
lukinovec
ae568e1227 Reduce nesting, rename methods 2023-05-24 14:29:30 +02:00
PHP CS Fixer
526002c7b2 Fix code style (php-cs-fixer) 2023-05-24 10:59:36 +00:00
lukinovec
0a6c1b69ea Update RLS policy command (use DB transactions, improve nesting) 2023-05-24 12:59:12 +02:00
lukinovec
0991f62aa5 Add info to bootstrapper's docblock 2023-05-24 12:32:36 +02:00
lukinovec
8eb9e5f19b Put DB operations inside transactions 2023-05-24 12:02:46 +02:00
lukinovec
6e2b56237f Add docblock to PostgresTenancyBootstrapper 2023-05-24 11:04:57 +02:00
lukinovec
2461f76e59 Use $tenant->database()->getUsername(), default to $tenant->getTenantKey() 2023-05-24 10:50:03 +02:00
lukinovec
5aed290de6 Delete complete todos 2023-05-23 10:28:59 +02:00
lukinovec
fcb54cbe8e Delete the UUID-specific logic, make RLS possible with non-UUID primary keys 2023-05-10 15:36:07 +02:00
lukinovec
253061730e Remove UUID constraint from RLS policy 2023-05-10 12:48:06 +02:00
PHP CS Fixer
c41559fd3d Fix code style (php-cs-fixer) 2023-05-10 03:54:12 +00:00
lukinovec
3449f19748 Fix PHPStan errors 2023-05-10 05:52:50 +02:00
PHP CS Fixer
4f9147bf81 Fix code style (php-cs-fixer) 2023-05-09 14:07:40 +00:00
lukinovec
17d779e130 Scope queries using Postgres RLS (WIP) 2023-05-09 16:07:06 +02:00
lukinovec
3c098dc78e Add Postgres bootstrapper 2023-05-09 15:13:10 +02:00
lukinovec
9ad183d296 Use tenantKeyColumn() instead of the config 2023-04-28 14:27:55 +02:00
lukinovec
b90b635f90 Add todos 2023-04-28 14:23:22 +02:00
PHP CS Fixer
483630897e Fix code style (php-cs-fixer) 2023-04-27 11:48:25 +00:00
lukinovec
a5d004132c Delete temp action, improve tests 2023-04-27 13:47:56 +02:00
lukinovec
2745f824aa Fix command 2023-04-27 13:44:45 +02:00