mirror of
https://github.com/flarum/core.git
synced 2025-08-04 07:27:39 +02:00
chore: not needed (auto scoping)
This commit is contained in:
@@ -294,13 +294,6 @@ class UserResource extends AbstractDatabaseResource
|
||||
Schema\Relationship\ToMany::make('groups')
|
||||
->writable(fn (User $user, Context $context) => $context->updating() && $context->getActor()->can('editGroups', $user))
|
||||
->includable()
|
||||
->get(function (User $user, Context $context) {
|
||||
if ($context->getActor()->can('viewHiddenGroups')) {
|
||||
return $user->groups->all();
|
||||
}
|
||||
|
||||
return $user->visibleGroups->all();
|
||||
})
|
||||
->set(function (User $user, $value, Context $context) {
|
||||
$actor = $context->getActor();
|
||||
|
||||
|
Reference in New Issue
Block a user