Skip to content

Conversation

@hassandotcms
Copy link
Contributor

@hassandotcms hassandotcms commented Nov 21, 2025

  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

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
@github-actions
Copy link

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.

- use immutables for views
- use established paginator pattern to return paginated results
- refactor assetPermissionHelper and return typed views.
@hassandotcms hassandotcms marked this pull request as ready for review December 23, 2025 12:39
- refactor and use permissionUtils and enums where applicable.
- fix integration tests.
Copy link
Contributor

@fabrizzio-dotCMS fabrizzio-dotCMS left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants