* chore: re-organize security locale keys alphabetically
* test: can globally logout
* feat: add global logout controller
* feat: add global logout UI to user security page
* test: re-adapt tests to changes
* feat: add boolean to indicate if logout even is global
* chore(review): split loading property
* chore: follow-up branch update
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* feat(phpstan): pick up extended model relations typings
* feat(phpstan): pick up extended model date attributes
* feat(core): introduce `castAttribute` extender
Stops using `dates` as it's deprecated in laravel 8
* feat(phpstan): pick up extended model attributes through casts
* fix: extenders not resolved when declared namespace
* fix(phpstan): new model attributes are always nullable
* chore(phpstan): add helpful cache clearing command
* Apply fixes from StyleCI
* chore: improve extend files provider logic
* chore: rename `castAttribute` to just `cast`
* chore: update phpstan package to detect `cast` method
* Update framework/core/src/Extend/Model.php
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* test: add reply creation tests
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: access checking being bypassed for post creation when first post is deleted
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: recover tests
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: make provider public
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: notifications grant access to private data of posts
* chore: fix tests
* test: start with tests about notification subject visibility
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: check subject access before sending notification to user
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: Daniël Klabbers <daniel@klabbers.email>
* feat: include current user as forum relation
* Update framework/core/src/Api/Controller/ShowForumController.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* Update framework/core/src/Api/Controller/ShowForumController.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* Update framework/core/src/Api/Serializer/ForumSerializer.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* Update framework/core/tests/integration/api/forum/ShowTest.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* Update framework/core/tests/integration/api/forum/ShowTest.php
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* No need to call the user endpoint as we already have the data loaded
* chore: return types
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
* Add delete all notifications option
* chore: `DELETE /api/notifications` as per conventions
* test: can delete all notifications
Co-authored-by: Sami Mazouz <ilyasmazouz@gmail.com>
* test: password tokens are generated and deleted on password change
* chore: delete all password tokens when the password is changed
* test: email tokens are generated and deleted on email change
* test: email tokens are deleted after password reset
* chore: delete email tokens after password change
* test: password tokens are deleted after email change
* chore: delete password tokens after email change
* chore: syntactic sugar
* chore: unify event listening
There is a check in the ExtensionManager::resolveExtensionOrder function that ignores optional dependencies on extensions that don't exist in the system. This is sufficient for resolution purposes.
The filter removed in this PR would ignore optional dependencies on non-enabled extensions, so when such an extension was enabled, dependency resolution would run incorrectly.
* perf: only update last seen time when current > 120s ago
* perf: only update `last_activity_at` every 2 mins
* docs: add comment
* fix: add missing param
* test: add tests
* tests: attempt tests fix
* fix(tests): call `$this->app()`
* chore: extract hard-coded values out to private consts
* chore: increase diff
* Apply suggestions from code review
Fixes#2492
* Added api/groups/{id} endpoint for retrieving a single group by its id
* Fixed GroupRepository incorrectly opening query to User instead of Group model
* Added filtering & paging abilities to GET api/groups endpoint
* Added test for sorting for GET api/groups endpoint
Co-authored-by: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com>