Ghost/apps/admin-x-settings/test/unit
Ronald Langeveld a9ad08cf89
Fixed API Query permissions in User Settings (#18680)
refs
https://www.notion.so/ghost/Cannot-fetch-invites-error-shown-for-authors-edc00af822d844e7add114fd834fc8fc

- the problem is that certain users don't have permissions to make
certain API calls.
- This adds a new hook that validates the current user against
permissions before a query can be made.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 9d9cc07</samp>

Added a `usePermission` hook and a `permissions` option for custom API
queries to implement role-based permissions in the admin settings app.
2023-10-18 17:04:59 +07:00
..
api Fixed API Query permissions in User Settings (#18680) 2023-10-18 17:04:59 +07:00
unsplash
utils