Extend API spec helper for new `admin_mode` PAT scope
What does this MR do and why?
Note: This MR is based on (but not blocked by) !107925 (merged).
This MR is part of the implementation plan in #42692 (comment 1222832412) to extend the Admin Mode feature to the API access using a personal access token (PAT).
In !107925 (merged), the Admin Mode is implemented for API as well - but behind a feature flag and without adapting any API specs. As a preparation for the adaption of the API specs (will be done in follow-up MRs), this MR extends the API spec helper for the new admin_mode
PAT scope (introduced in !107875 (merged)).
Further information: #42692 (closed)
/cc @bufferoverflow
How to set up and validate locally
- In API specs, use the
admin_mode
parameter to add theadmin_mode
scope to the PAT on an API request:
get api('/application/appearance', current_user, admin_mode: true)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.