1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 17:24:03 +00:00

Commit graph

  • 1111607495 Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-28 08:13:36 +00:00
  • 855ebfbd0b Protect queries from SQL injection (CreatePostgresUserForTenant) lukinovec 2023-06-28 10:13:13 +02:00
  • 30f4f430d5 Fix default permissions lukinovec 2023-06-28 09:51:30 +02:00
  • a504a86789 Use specific default user permissions instead of granting all lukinovec 2023-06-28 09:35:40 +02:00
  • 238132781d Rename method lukinovec 2023-06-28 07:27:51 +02:00
  • 66c2ac4fa4 Delete typo lukinovec 2023-06-27 17:56:55 +02:00
  • d005e7b06d Test that tenant permmissions are scoped only to the tenant schema lukinovec 2023-06-27 17:48:47 +02:00
  • 08b4216d69 Rename variable lukinovec 2023-06-27 14:09:10 +02:00
  • c712505d4e Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-27 10:38:48 +00:00
  • a568aa3626 Update the Postgres RLS bootstrapper lukinovec 2023-06-27 12:38:21 +02:00
  • 72b708e4c7 Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-27 10:19:08 +00:00
  • 0fa52e5020 Update password defaulting logic lukinovec 2023-06-27 12:18:44 +02:00
  • 339f8e5778 Delete default value for config('tenancy.token') lukinovec 2023-06-27 11:05:36 +02:00
  • d449fba037 Make default password an empty string lukinovec 2023-06-27 10:40:54 +02:00
  • c4fb7b225e
    Use static instead of tenancy() lukinovec 2023-06-27 10:10:54 +02:00
  • 8106e60aeb Delete assertion lukinovec 2023-06-22 12:29:29 +02:00
  • 083ecff791 Adapt tests to the previous tenant logic lukinovec 2023-06-22 11:29:31 +02:00
  • 675eb26981 Bring back the previous tenant logic lukinovec 2023-06-22 11:27:11 +02:00
  • c5d98aee33 Test that the tenant connections get closed after jobs get processed lukinovec 2023-06-22 10:45:27 +02:00
  • 42dc85666f Revert to central context when jobs get processed, delete $previousTenant logic lukinovec 2023-06-22 10:30:05 +02:00
  • d5d2c2475e Test that the context is central after jobs get processed lukinovec 2023-06-22 10:28:47 +02:00
  • a56c70779f Fix: Sync when ID's are duplicated Ion Caliman 2023-06-21 18:59:35 +03:00
  • 4bc82b535a Added a failing test: Duplicate entry Ion Caliman 2023-06-21 18:56:20 +03:00
  • 89b9e1bfd9 Filter out non-model array items lukinovec 2023-06-19 15:30:12 +02:00
  • 033f9a4dca Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-19 13:26:02 +00:00
  • 9262d95ce4 Revert try/catch removal, add/update comments lukinovec 2023-06-19 15:24:39 +02:00
  • 376f7ba0b0 Fix variable name lukinovec 2023-06-19 14:09:40 +02:00
  • 171b01ba9d Fix PHPStan error, update variable names lukinovec 2023-06-19 14:02:18 +02:00
  • 032e29ac79 Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-19 11:55:44 +00:00
  • 42b7ab2bd6 Make tenancy.token config call in the Sevice class default to an empty string lukinovec 2023-06-19 13:55:16 +02:00
  • eddb95c014 Use reflection instead of try/catch, use arrays instead of collections lukinovec 2023-06-19 13:53:27 +02:00
  • 8d13ce7e2f Add/update comments lukinovec 2023-06-19 12:57:16 +02:00
  • 1fd1aa7ad6 Delete dump, use getTenantModels lukinovec 2023-06-16 11:08:07 +02:00
  • 89d9e20c38 Dump dropped policies lukinovec 2023-06-16 10:47:35 +02:00
  • 43d167bb48 Comment out dropping policies lukinovec 2023-06-16 10:35:44 +02:00
  • c25aa221cb Drop policy if exists lukinovec 2023-06-16 10:31:55 +02:00
  • 46b89fd0ec Delete dump, put getModels into transaction lukinovec 2023-06-16 10:26:15 +02:00
  • bd7f885c23 Delete dump lukinovec 2023-06-16 10:22:15 +02:00
  • a9b8f1a299 move dump lukinovec 2023-06-16 10:04:51 +02:00
  • eb5829175e Test if the db statement is incorrect lukinovec 2023-06-16 09:57:58 +02:00
  • 92ed22ef19 Query log lukinovec 2023-06-16 09:41:09 +02:00
  • 9aee480a80 Dump DB statement lukinovec 2023-06-16 09:33:55 +02:00
  • 796a251b7d Check RLS tables lukinovec 2023-06-16 09:28:38 +02:00
  • e024701ab9 Try using getModels() outside of DB::transaction() lukinovec 2023-06-16 09:20:49 +02:00
  • 1fb90129cf Revert CI testing changes lukinovec 2023-06-16 08:42:36 +02:00
  • 8b8cd00ca8 CI testing lukinovec 2023-06-16 08:38:16 +02:00
  • 1f5ed5ba22 Use getModels (testing CI) lukinovec 2023-06-16 08:37:31 +02:00
  • 6bd78b4520 Delete dump() lukinovec 2023-06-15 13:52:18 +02:00
  • b0effa60e7 debug lukinovec 2023-06-15 13:44:39 +02:00
  • 8c87dde85d Use getTenantModels instead of getModels in RLS poilcy creation command lukinovec 2023-06-15 13:44:31 +02:00
  • f0b31d1820 debug lukinovec 2023-06-15 13:36:26 +02:00
  • 9e9e81b69c debug lukinovec 2023-06-15 13:28:17 +02:00
  • 7b092ec9d3 Check RLS policies by name lukinovec 2023-06-15 13:16:57 +02:00
  • 0f9e0f33b0 Move Postgres user permissions to config lukinovec 2023-06-15 13:03:44 +02:00
  • 1ce18d2759 Add basic model discovery test lukinovec 2023-06-15 11:45:38 +02:00
  • 5cb3b5f4c1 Improve query scoping test lukinovec 2023-06-15 11:07:31 +02:00
  • e8b3c23c72 Purge central connection in RLS bootstrapper's bootstrap() lukinovec 2023-06-15 11:06:57 +02:00
  • f859a5da06 Move RLS toggling and model directories config to tenancy.rls lukinovec 2023-06-15 10:27:18 +02:00
  • 6b19a26d2c Automatically scan subdirectories in getModels() lukinovec 2023-06-15 10:20:18 +02:00
  • 37b36430e5 Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-15 07:33:39 +00:00
  • 7d77c171d5 Delete unused method lukinovec 2023-06-15 09:33:05 +02:00
  • 97f227a037 Use instanceof instead of class_parents() lukinovec 2023-06-15 09:32:56 +02:00
  • 00af2d6eaf Check for class traits instead of the DB columns lukinovec 2023-06-15 09:32:25 +02:00
  • 741af3929c Add test for granting permissions to new Postgres users lukinovec 2023-06-14 09:40:55 +02:00
  • c31340bff0 Only grant the permissions from the static property in the user creation job lukinovec 2023-06-14 08:30:33 +02:00
  • 73144a874a Use new static instead of checking class_implements() lukinovec 2023-06-14 08:27:40 +02:00
  • c1fb86cf34
    Prevent 500 error when non-real path is given Craig Riley 2023-06-11 01:53:58 +01:00
  • f93d075fa5
    Uniform deletion of 'tenant' from route params Craig Riley 2023-06-11 01:33:34 +01:00
  • a3a0320fb4
    Controller action for path-identified assets Craig Riley 2023-06-11 01:32:26 +01:00
  • e351a68f6f
    Changed controller action Craig Riley 2023-06-11 01:30:50 +01:00
  • 84f40f542c
    Add alternate route for path-identified assets Craig Riley 2023-06-11 01:29:22 +01:00
  • 212653e245
    Adapt tenant_asset for path identification Craig Riley 2023-06-11 01:26:31 +01:00
  • f0faf41522 Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-07 13:01:53 +00:00
  • ac00f03273 Move model-related things from Tenancy to a trait lukinovec 2023-06-07 14:45:36 +02:00
  • a5a9f1431e Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-07 11:59:10 +00:00
  • b7c24ef4ab Rename RLSModel lukinovec 2023-06-07 13:58:47 +02:00
  • f37a29f592 Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-07 11:56:08 +00:00
  • fa43d8ae1d Rename RLSModel to RlsModel, fix global scope test lukinovec 2023-06-07 13:55:43 +02:00
  • f84e3ffc02 Put DB statements into transaction lukinovec 2023-06-07 11:00:28 +02:00
  • 6bd23d5e3e Simplify CreateRLSPoliciesForTenantTables lukinovec 2023-06-07 10:03:40 +02:00
  • 1bc6885a4c Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-07 07:41:48 +00:00
  • d0d38cef26 Update RLS tests (test both the config and the interface) lukinovec 2023-06-07 09:41:22 +02:00
  • bc28b0c2ed Add RLSModel interface, update BelongsToTenant lukinovec 2023-06-07 09:37:32 +02:00
  • b3d9090284 Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-06 13:48:32 +00:00
  • 4175ac07bd Rework model discovery lukinovec 2023-06-06 15:46:50 +02:00
  • 3bfef9e2c4 Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-05 14:36:19 +00:00
  • 7d44322b7e Rename test file, update tests lukinovec 2023-06-05 16:35:50 +02:00
  • cc28d1813a Move reusable methods to Tenancy, get rid of tenancy.models.rls lukinovec 2023-06-05 16:35:16 +02:00
  • bad5c693ab Add config('tenancy.database.rls') lukinovec 2023-06-05 16:33:26 +02:00
  • cb775a9fba Improve RLS policy creation command lukinovec 2023-06-05 13:43:21 +02:00
  • 9f166a59a4 Fix code style (php-cs-fixer) PHP CS Fixer 2023-06-05 10:04:15 +00:00
  • 983e4c1f84 Get RLS models from a temporary tenant lukinovec 2023-06-05 12:03:48 +02:00
  • 7c7680baf6 Make PostgresRLSBootstrapper a singleton lukinovec 2023-06-05 12:02:41 +02:00
  • 45df85d2a3 Reverr all docker-compose changes lukinovec 2023-06-05 10:09:18 +02:00
  • 5754f8bdc4 Get central connection name from the config lukinovec 2023-06-05 10:08:48 +02:00
  • 825ef3bbe8
    Merge branch 'archtechx:3.x' into 3.x Leandro Gehlen 2023-06-01 14:47:15 -03:00
  • 12b36f407d Rename bootstrapper, improve docblock lukinovec 2023-06-01 10:26:39 +02:00
  • 3738d2885c Revert beforeEach cleanup (tests fail in CI) lukinovec 2023-05-31 14:02:54 +02:00
  • b964aa90d3 Improve code style, beforeEach cleanup lukinovec 2023-05-31 13:58:25 +02:00
  • 5b07afcc33 Improve comment lukinovec 2023-05-31 13:44:22 +02:00