This commit is contained in:
isUnknown 2024-12-04 15:09:22 +01:00
parent e63f1188c8
commit ea299ef583
3 changed files with 98 additions and 10 deletions

View file

@ -118,11 +118,11 @@ class ProjectPage extends Page {
public function managers() {
return kirby()->users()->filter(function($user) {
if ($user->projects()->isEmpty()) {
if ($user->role() != 'admin' && $user->projects()->isEmpty()) {
return false;
}
return $user->role() === 'admin' || $user->projects()->toPages()->has($this);
return $user->role() == 'admin' || $user->projects()->toPages()->has($this);
});
}
}