Restrict notifications to entities that are published

Created on 10 June 2025, 2 months ago

Problem/Motivation

I have a website where users can suggest events or resources that are originally unpublished until reviewed by a Content Administrator who publishes the suggested resources or events if appropriate.

Currently, the unpublished entities are added to the site notifications, and other users see Access Denied when they follow the link in notifications.

Steps to reproduce

Proposed resolution

If the the code was changed so that notifications only get created when an entity is published, I could have the notifications set for node CREATE or UPDATE, and the UPDATE action where the node gets published would then add the notification to the Notification Widget.

Remaining tasks

Add a check for entity published before adding it to the Notification Messages

User interface changes

The requirement for an entity to be published could be the default and not require an admin UI change, or an option could be added to allow the user to select whether to notify on unpublished entities or not.

API changes

Data model changes

Feature request
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @austin_brian
  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    I guess the use case might differ for different projects. I for example had a use case where the client wanted to get a notification when a node was created, but not yet published (workflow review process).

    I think it makes more sense to add an Access check to only show the notification if you have permission to view that specific entity. Would that cover your use case as well?

  • bramdrisen, I think adding a check to see if the use rbeing notified has permission to view the entity is a good solution. That would cover my use case.

  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Production build 0.71.5 2024