-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Move manifest endpoints to their own, independent API group and fix access policies accordingly #15989
Merged
iOvergaard
merged 12 commits into
v14/dev
from
v14/feature/manifests-as-independent-api-group
Apr 9, 2024
Merged
Move manifest endpoints to their own, independent API group and fix access policies accordingly #15989
iOvergaard
merged 12 commits into
v14/dev
from
v14/feature/manifests-as-independent-api-group
Apr 9, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nuklon
reviewed
Apr 5, 2024
src/Umbraco.Cms.Api.Management/Controllers/Manifest/PrivateManifestManifestController.cs
Outdated
Show resolved
Hide resolved
Nuklon
reviewed
Apr 5, 2024
src/Umbraco.Cms.Api.Management/Controllers/Manifest/PublicManifestManifestController.cs
Outdated
Show resolved
Hide resolved
Nuklon
reviewed
Apr 5, 2024
Thanks @Nuklon 👍 |
…group # Conflicts: # src/Umbraco.Cms.Api.Management/Controllers/Manifest/AllManifestController.cs # src/Umbraco.Cms.Api.Management/Controllers/Manifest/PublicManifestManifestController.cs
…sts-as-independent-api-group # Conflicts: # src/Umbraco.Cms.Api.Management/OpenApi.json
iOvergaard
approved these changes
Apr 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a /private endpoint to get only the private packages. Updated the OpenApi.json file to match after merging v14/dev. It's looking good to me now!
…ing out through the management api
…s of 'install', 'upgrade', and 'logout'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
We currently have issues with non-admins not being able to access package manifests from the server. This is because the "all manifests" endpoint is part of the Packages API group. In this group, all API controllers inherit from the
PackageControllerBase
, which requires access to the packages section to invoke.Since base class attributes (
[Authorize]
in this case) cannot be overwritten by specialised classes, we have two choices:PackageControllerBase
and decorate all other controllers in the Packages API group instead.Although manifests and packages have a certain cohesion, the manifest endpoints are actually utilised completely independently of the package endpoints. Therefore, option 2 has been chosen.
Testing this PR
First and foremost, verify that the manifest endpoints are now located in their own Manifest group in the Swagger docs:
Now test the access policies:
/umbraco/management/api/v1/manifest/manifest
should be able to invoke with any backoffice user (i.e. an editor user)/umbraco/management/api/v1/manifest/manifest/public
should be able to invoke as anonymous.