users / notifications : temporary disabled notifications system
This commit is contained in:
parent
9167519388
commit
ef6375f4cc
15 changed files with 302 additions and 113 deletions
|
|
@ -13,8 +13,23 @@
|
|||
* @throws Exception If an error occurs while updating a user's notifications.
|
||||
*/
|
||||
|
||||
return function ($projectUri, $notificationData) {
|
||||
$recipients = page($projectUri)->managers()->toUsers()->not($this);
|
||||
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);
|
||||
|
||||
if (!$recipients) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue