-
Notifications
You must be signed in to change notification settings - Fork 480
modernize(permissions): rest api for get asset permissions (#33835) #33888
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
Merged
+1,771
−79
Conversation
This file contains hidden or 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
1. New GET /permissions/{assetId} endpoint - View asset permissions with pagination, supporting all permissionable types (folders, hosts, contentlets, etc.)
2. Permission helper infrastructure - Added AssetPermissionHelper for building responses and ResponseEntityAssetPermissionsView for typed API responses, integrated via CDI
3. Documentation and tests - OpenAPI spec updates and comprehensive Postman test suite covering happy paths, pagination, validation, and error cases
…-get-asset-permissions
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
- fix constructor calls
…-get-asset-permissions
- use immutables for views - use established paginator pattern to return paginated results - refactor assetPermissionHelper and return typed views.
dotCMS/src/main/java/com/dotcms/rest/api/v1/system/permission/AbstractAssetPermissionsView.java
Outdated
Show resolved
Hide resolved
dotCMS/src/main/java/com/dotcms/rest/api/v1/system/permission/AbstractRolePermissionView.java
Show resolved
Hide resolved
dotCMS/src/main/java/com/dotcms/rest/api/v1/system/permission/AbstractRolePermissionView.java
Outdated
Show resolved
Hide resolved
dotCMS/src/main/java/com/dotcms/rest/api/v1/system/permission/PermissionResource.java
Show resolved
Hide resolved
dotCMS/src/main/java/com/dotcms/rest/api/v1/system/permission/AssetPermissionHelper.java
Outdated
Show resolved
Hide resolved
- refactor and use permissionUtils and enums where applicable. - fix integration tests.
…-get-asset-permissions
fabrizzio-dotCMS
approved these changes
Dec 23, 2025
Contributor
fabrizzio-dotCMS
left a comment
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.
enum Scope needs to be public
Other than that it looks really nice
dario-daza
approved these changes
Dec 26, 2025
Laura-dotCMS
pushed a commit
that referenced
this pull request
Jan 5, 2026
…33888) 1. New GET /permissions/{assetId} endpoint - View asset permissions with pagination, supporting all permissionable types (folders, hosts, contentlets, etc.) 2. Permission helper infrastructure - Added AssetPermissionHelper for building responses and ResponseEntityAssetPermissionsView for typed API responses, integrated via CDI 3. Documentation and tests - OpenAPI spec updates and comprehensive Postman test suite covering happy paths, pagination, validation, and error cases ### Proposed Changes - New endpoint: GET /v1/permissions/{assetId} with pagination support (page, per_page) - New immutable views: AssetPermissionsView, RolePermissionView using @Value.Immutable - New paginator: AssetPermissionsPaginator following existing patterns - Refactored: AssetPermissionHelper to return typed views instead of Map<String, Object> ### Checklist - [ ] Tests - [ ] Translations - [ ] Security Implications Contemplated (add notes if applicable) ### Additional Info ** any additional useful context or info ** ### Screenshots Original | Updated :-------------------------:|:-------------------------: ** original screenshot ** | ** updated screenshot ** This PR fixes: #33835
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.
Proposed Changes
Checklist
Additional Info
** any additional useful context or info **
Screenshots
This PR fixes: #33835
This PR fixes: #33835