-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Fully permissions based links (#70)
* chore: refactor to start using model visibility, add first tests * Apply fixes from StyleCI * fix: phpstan error * simply test * Apply fixes from StyleCI * caching for guest users only * remove comment * create link test * Apply fixes from StyleCI * more tests * Apply fixes from StyleCI * add minimal db entry * wip * Apply fixes from StyleCI * format * seems to be working * Apply fixes from StyleCI * now working correctly * Apply fixes from StyleCI * cleanup, remove commented code, etc * add translations * add migrate data migration, drop visibility col * Apply fixes from StyleCI * add guestOnly property * add translation, clean up * Apply fixes from StyleCI * chore: update copy to reflect actual behaiour * Update js/src/admin/components/EditLinkModal.js Co-authored-by: Davide Iadeluca <[email protected]> * Update js/src/admin/components/EditLinkModal.js Co-authored-by: Davide Iadeluca <[email protected]> * Update js/src/admin/components/EditLinkModal.js Co-authored-by: Davide Iadeluca <[email protected]> * use translations where possible * fix: check for existence of column --------- Co-authored-by: StyleCI Bot <[email protected]> Co-authored-by: Davide Iadeluca <[email protected]>
- Loading branch information
1 parent
8087cea
commit 652a948
Showing
37 changed files
with
1,463 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ jobs: | |
run: | ||
uses: flarum/framework/.github/workflows/[email protected] | ||
with: | ||
enable_backend_testing: false | ||
enable_backend_testing: true | ||
enable_phpstan: true | ||
|
||
backend_directory: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules | ||
composer.lock | ||
vendor | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
migrations/2024_10_10_000000-add_is_restricted_to_links_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of fof/links. | ||
* | ||
* Copyright (c) FriendsOfFlarum. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Flarum\Database\Migration; | ||
|
||
return Migration::addColumns('links', [ | ||
'is_restricted' => ['boolean', 'default' => 0], | ||
]); |
16 changes: 16 additions & 0 deletions
16
migrations/2024_10_11_000000_add_guest_only_to_links_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of fof/links. | ||
* | ||
* Copyright (c) FriendsOfFlarum. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Flarum\Database\Migration; | ||
|
||
return Migration::addColumns('links', [ | ||
'guest_only' => ['boolean', 'default' => 0], | ||
]); |
Oops, something went wrong.