Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prep for flarum/gdpr #85

Merged
merged 4 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ jobs:
with:
enable_backend_testing: true
enable_phpstan: true
php_versions: '["7.4", "8.0, "8.1", "8.2", "8.3"]'

backend_directory: .
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"flarum/core": "^1.8.1",
"league/oauth1-client": "^1.10.1",
"league/oauth2-facebook": "^2.2.0",
Expand Down Expand Up @@ -71,7 +72,10 @@
"name": "fas fa-sign-in-alt",
"backgroundColor": "#e74c3c",
"color": "#fff"
}
},
"optional-dependencies": [
"flarum/gdpr"
]
},
"flagrow": {
"discuss": "https://discuss.flarum.org/d/25182"
Expand Down
8 changes: 8 additions & 0 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,12 @@

(new Extend\SimpleFlarumSearch(UserSearcher::class))
->addGambit(Query\SsoIdFilterGambit::class),

(new Extend\Conditional())
->whenExtensionEnabled('flarum-gdpr', fn () => [
(new Extend\ApiSerializer(ForumSerializer::class))
->attribute('passwordlessSignUp', function (ForumSerializer $serializer) {
return !$serializer->getActor()->isGuest() && $serializer->getActor()->loginProviders()->count() > 0;
}),
]),
];
Loading