Notifications: the Backup alerts row never shows

Open Beginner friendly
#755 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
laravel, php, react, typescript

Research direction

Start in resources/js/pages/account/notifications.tsx near line 79, where the Backup alerts row is gated on auth.user.capabilities.includes('backups.alert'). Change that check to backups.manage, leaving app/Domain/Notices/BuiltInNotices.php alone since it defines a notice kind, not a permission. Add a test showing an administrator sees the row and an editor does not. Done when the Always sent panel lists three rows for a backup manager and the new test passes.

Written by the indexing model from the issue text.

Description

area/admin type/bug when/soon

On Account › Notifications, the Always sent panel should list three locked rows, including Backup alerts for people who manage backups. It shows two: the row is gated on auth.user.capabilities.includes('backups.alert') (resources/js/pages/account/notifications.tsx, about line 79), but backups.alert is a notice kind (app/Domain/Notices/BuiltInNotices.php), not a permission. The permission is backups.manage.

Fix: gate the row on backups.manage, with a test that an administrator sees it and an editor doesn't.

Dominant language
PHP
Stars
1
Forks
1
Avg merge
1h 40m
Merged PRs (30d)
143

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from temecms/teme

All issues in temecms/teme

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.