Check if this was not the error
This commit is contained in:
@@ -126,7 +126,7 @@ class ProjectController extends Controller
|
|||||||
->values()
|
->values()
|
||||||
->all();
|
->all();
|
||||||
|
|
||||||
$this->projectPermissionService->syncUserPermissions($project, $user, $request->permissions());
|
$this->projectPermissionService->syncUserPermissions($project, $user, $permissions);
|
||||||
|
|
||||||
return to_route('projects.access', $project)
|
return to_route('projects.access', $project)
|
||||||
->with('status', "{$user->name} permissions were updated.");
|
->with('status', "{$user->name} permissions were updated.");
|
||||||
|
|||||||
@@ -32,16 +32,5 @@ class SyncProjectPermissionsRequest extends FormRequest
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
public function permissions(): array
|
|
||||||
{
|
|
||||||
return collect($this->validated('permissions', []))
|
|
||||||
->map(fn (mixed $permission): string => (string) $permission)
|
|
||||||
->unique()
|
|
||||||
->values()
|
|
||||||
->all();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user