user(); assert($actor instanceof User); return response()->json([ 'data' => $this->accounts->assignableRoles($actor) ->map(fn (Role $role): array => [ 'id' => $role->id, 'name' => $role->name, 'is_system' => $role->is_system, 'is_administrator' => $role->is_administrator, 'client_scoped' => $role->client_scoped, ]) ->all(), ]); } }