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

Restrict who can use the lastSeenAt user sort #2634

Merged
merged 9 commits into from
Mar 2, 2021
Prev Previous commit
Next Next commit
Apply fixes from StyleCI
[ci skip] [skip ci]
  • Loading branch information
clarkwinkelmann authored and StyleCIBot committed Mar 2, 2021
commit 6fc8bc83147405238fe3f0a541654e2eb555a010
2 changes: 1 addition & 1 deletion src/Api/Controller/ListUsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected function data(ServerRequestInterface $request, Document $document)

$actor->assertCan('viewUserList');

if (!$actor->hasPermission('user.viewLastSeenAt')) {
if (! $actor->hasPermission('user.viewLastSeenAt')) {
// If a user cannot see everyone's last online date, we prevent them from sorting by it
// Otherwise this sort field would defeat the privacy setting discloseOnline
// We use remove instead of add so that extensions can still completely disable the sort using the extender
Expand Down