id === $notification->user_id || $this->canManage($user); } public function update(User $user, Notification $notification): bool { return $this->canManage($user); } public function delete(User $user, Notification $notification): bool { return $this->canManage($user); } private function canManage(User $user): bool { return $user->hasRole('admin') || $user->hasPermission('notifications.manage'); } }