1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:44:04 +00:00
Commit graph

24 commits

Author SHA1 Message Date
Samuel Štancl
7bacc50b27
[4.x] Storage::url() support (modified #689) (#909)
* This adds support for tenancy aware  Storage::url() method

* Trigger CI build

* Fixed Link command for Laravel v6, added StorageLink Events, more StorageLink tests, added RemoveStorageSymlinks Job, added Storage Jobs to TenancyServiceProvider stub, renamed misleading config example.

* Fix typo

* Fix code style (php-cs-fixer)

* Update config comments

* Format code in Link command, make writing more concise

* Change "symLinks" to "symlinks"

* Refactor Link command

* Fix test name typo

* Test fetching files using the public URL

* Extract Link command logic into actions

* Fix code style (php-cs-fixer)

* Check if closure is null in CreateStorageSymlinksAction

* Stop using command terminology in CreateStorageSymlinksAction

* Separate the Storage::url() test cases

* Update url_override comments

* Remove afterLink closures, add types, move actions, add usage explanation to the symlink trait

* Fix code style (php-cs-fixer)

* Update public storage URL test

* Fix issue with using str()

* Improve url_override comment, add todos

* add todo comment

* fix docblock style

* Add link command tests back

* Add types to $tenants in the action handle() methods

* Fix typo, update variable name formatting

* Add tests for the symlink actions

* Change possibleTenantSymlinks not to prefix the paths twice while tenancy is initialized

* Fix code style (php-cs-fixer)

* Stop testing storage directory existence in symlink test

* Don't specify full namespace for Tenant model annotation

* Don't specify full namespace in ActionTest

* Remove "change to DI" todo

* Remove possibleTenantSymlinks return annotation

* Remove symlink-related jobs, instantiate and use actions

* Revert "Remove symlink-related jobs, instantiate and use actions"

This reverts commit 547440c887.

* Add a comment line about the possible tenant symlinks

* Correct storagePath and publicPath variables

* Revert "Correct storagePath and publicPath variables"

This reverts commit e3aa8e2086.

* add a todo

Co-authored-by: Martin Vlcek <martin@dontfreakout.eu>
Co-authored-by: lukinovec <lukinovec@gmail.com>
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2022-09-28 05:09:45 +02:00
lukinovec
ab5fa7a247
[4.x] Optionally delete storage after tenant deletion (#938)
* Add test for deleting storage after tenant deletion

* Save `storage_path()` in a variable after initializing tenant in test

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>

* Add DeleteTenantStorage listener

* Update test name

* Remove storage deletion config key

* Remove tenant storage deletion events

* Move tenant storage deletion to the DeletingTenant event

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2022-09-20 19:42:00 +02:00
Abrar Ahmad
627233d07a
[4.x] Don't use onDeleteCascade in the migrations (#883)
* removed `cascade` on delete for domains

* removed only `onDelete` cascade

* keep impersonation migrations unchanged

* domains set null on delete

* Update 2019_09_15_000020_create_domains_table.php

* Added DeleteDomain Job while deleting tenant.

* Update assets/TenancyServiceProvider.stub.php

Co-authored-by: Samuel Štancl <samuel@archte.ch>

* renamed class

* Update DeleteDomains.php

* onDelete restrict

* revert nullable

* removed `shouldQueue` interface

* Update TenancyServiceProvider.stub.php

* fetch and delete domains individually

* Update DeleteDomains.php

* tests for `DeleteDomains` job

Co-authored-by: Samuel Štancl <samuel@archte.ch>
2022-07-20 13:02:33 +02:00
Roelof Roos
1a5300ab4f
Fix array_unique causing problems in TenancyServiceProvider stub (#672)
Closes #661
2021-06-15 20:43:53 +02:00
stancl
27fd2e7951 Apply fixes from StyleCI 2020-12-14 12:12:13 +00:00
Samuel Štancl
1fbe9cf3e2
Fix #562 2020-12-14 13:12:03 +01:00
bepsvpt
1ff82fb2a0
reverse middlewares order before prepend (#479) 2020-08-18 16:02:26 +02:00
Samuel Stancl
ba52bfa710
Formatting 2020-06-23 13:49:46 +02:00
Samuel Štancl
0378f142ec Minor changes 2020-06-03 13:32:35 +02:00
Samuel Štancl
da23662d7b Clenup for resource syncing 2020-06-01 09:51:22 +02:00
Samuel Štancl
43d75cdd38 Fix tenants:list 2020-05-29 09:33:49 +02:00
Samuel Štancl
2839f45196 Refactor models & config 2020-05-24 20:40:10 +02:00
stancl
6955512a6b Apply fixes from StyleCI 2020-05-22 09:01:31 +00:00
Samuel Štancl
33d6fd82da -ing event behavior 2020-05-21 17:55:48 +02:00
Samuel Štancl
e6e4548a22 Use % for CREATE % GRANT queries 2020-05-20 14:33:24 +02:00
Samuel Štancl
1329356b4b Refactor stub provider, add middleware priority logic 2020-05-19 16:36:15 +02:00
Samuel Štancl
b87c0bc9d2 Add more events 2020-05-17 17:42:09 +02:00
Samuel Štancl
7a7200fd25 Minor fixes for using the package in an app 2020-05-16 11:56:32 +02:00
Samuel Štancl
1833622170 Extract JobPipelines to a separate package 2020-05-15 18:26:08 +02:00
Samuel Štancl
de53b81c0e Change default tenant model, write more tests, cleanup 2020-05-13 06:23:41 +02:00
Samuel Štancl
c32f229dd5 Refactor more old code and get tests to pass 2020-05-13 04:51:37 +02:00
Samuel Štancl
08ed5084d5 JobPipeline now works fully 2020-05-08 16:57:14 +02:00
Samuel Štancl
7a2e6bb13e JobPipeline tests 2020-05-08 05:12:46 +02:00
Samuel Štancl
bd9aad229b vague first draft of v3. TenantModelTest is passing 2020-05-08 04:37:43 +02:00