Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect permissions required for Notifications sign up #4260

Closed
matthew-hair opened this issue Jan 25, 2019 · 2 comments
Closed

incorrect permissions required for Notifications sign up #4260

matthew-hair opened this issue Jan 25, 2019 · 2 comments

Comments

@matthew-hair
Copy link
Contributor

To list and sign up for notifications on a node, a user must have the "Permissions" permission, which "Allow access to change permissions for a node". By default, this excludes members of the Writers and Editors groups. These groups should normally be able to receive notifications.

Reproduction

In Umbraco 7.12.0 and higher:

  1. Log in to the back office as a user who doesn't have "Permissions" permission (for example, a member of the Editors group).
  2. Navigate to the Content section, right-click a node, and click Notifications.

Expected result

I would expect to see a list of toggles that allow the user to choose which node changes that will trigger a notification email to be sent to the user.

Actual result

Umbraco displays a permissions error in place of the list of toggles:

notificationspermissionbug

Location of the bug in the code

The bug is caused by a typo in the GetNotificationOptions(int contentId) method in the Umbraco.Web.Editors.ContentController class:
[EnsureUserPermissionForContent("contentId", 'R')] public IEnumerable<NotifySetting> GetNotificationOptions(int contentId) { … }

Instead of checking for the 'R' permission, it should check for the 'F' permission, which is the code for "Browse Node", "Allow access to view a node".

@nul800sebastiaan
Copy link
Member

Thanks, fixed for 7.14!

@matthew-hair
Copy link
Contributor Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants