notifications working
This commit is contained in:
parent
699c0bfa1d
commit
8ae00d7657
8 changed files with 28 additions and 202 deletions
|
|
@ -14,22 +14,7 @@
|
|||
*/
|
||||
|
||||
return function ($project, $notificationData) {
|
||||
$recipients = kirby()->users()->filter(function($user) use ($project) {
|
||||
if ($user === $this || $user->projects()->isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
throw new Exception(json_encode($user->name()), 1);
|
||||
|
||||
$projects = $user->projects();
|
||||
if ($projects && ($user->role() == 'admin' || $projects->has($project))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
// $recipients = page($projectUri)->managers()->toUsers()->not($this);
|
||||
$recipients = $project->managers()->without($this);
|
||||
|
||||
if (!$recipients) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue