FriendsOfShopware / FroshPlatformMailArchive

This plugin allows you to archive your mails.
MIT License
17 stars 13 forks source link

bugfix: check acl for correct permission #63

Closed AubreyHewes closed 1 year ago

AubreyHewes commented 1 year ago

When a role does not have the correct permissions then you get the shopware popup about missing permissions (frosh_mail_archive:read). Also the settings panel is displayed but can not be used as you do not have the correct permissions.

This PR tries to alleviate the above;

  1. Ensures the initial repository search is only done if permission frosh_mail_archive:read is allowed.
  2. Ensures the settings navigation item is only rendered if permission frosh_mail_archive:read is allowed.
  3. Ensures the settings pages are only accessible via route if permission frosh_mail_archive:read is allowed.

A possible future improvement would be to include a proper acl for the frosh_mail_archive detail actions (resend, hide the customer button etc). But is out of scope for this PR - which was to remove the permissions missing popups and unusable settings navigation items.

tinect commented 1 year ago

Thank you @AubreyHewes :-)