Skip to content

Conversation

@hassandotcms
Copy link
Contributor

@hassandotcms hassandotcms commented Oct 2, 2025

Proposed Changes

  • Implemented REST API to save/update user permissions on specific assets (hosts/folders)
  • Supports multiple permission scopes (INDIVIDUAL, HOST, FOLDER) and levels (READ, WRITE, PUBLISH, EDIT_PERMISSIONS, CAN_ADD_CHILDREN)
  • Supports cascading permissions to child assets
  • Added integration tests covering success scenarios, validation, and security checks

fixes #33393

…user. (#33345)

- implement helper methods for user permission rest api.
… user. (#33345)

 - get api implementation to return user specific permissions by id/email, by hosts/folder.
…user. (#33345)

- integration test added to verify the functionality of get user permissions rest api.
…ement-rest-api-get-user-permissions-endpoint
…user. (#33345)

fix integration tests, response type error.
…user. (#33345)

support api classes to be available for injection via CDI.
…user. (#33345)

enable CDI for userPermissionHelper, to enable injection.
… user. (#33345)

  - Return specific response type instead of generic Response
  - Add better documentation and error messages
  - Split user loading into separate helper method
…ement-rest-api-get-user-permissions-endpoint
…tadata. (#33394)

 add view class for permission metadata.
…adata. (#33394)

implement rest api for permission metadata.
…adata. (#33394)

add javadoc, refactoring in helper methods to make them reusable and update api docs.
…tadata. (#33394)

 add postman test for permission metadata api
 - Create PermissionMetadata, UserPermissions, and UserPermissionAsset beans for type-safe API responses
 - Update permission endpoints to return ResponseEntityView wrappers instead of generic Response objects
 - Replace Map-based data structures with beans
- created rest resource endpoint to save/update user permissions.
- helper methods to validate transform permission data
- write integration tests to validate the user permissions.
  success/validation scenarios.
…ement-rest-api-save-user-permissions-endpoint
…33393-implement-rest-api-save-user-permissions-endpoint
@hassandotcms hassandotcms force-pushed the 33393-implement-rest-api-save-user-permissions-endpoint branch from 44c897b to 4106e61 Compare October 10, 2025 14:29
@hassandotcms hassandotcms requested a review from jdotcms October 10, 2025 15:30
* @throws DotDataException if asset resolution fails
* @throws DotSecurityException if security check fails
*/
public Permissionable resolveAsset(final String assetId, final User systemUser)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should rename system user as a just user

@hassandotcms hassandotcms marked this pull request as ready for review October 13, 2025 15:07
 1. Change List→Set for permission levels to prevent duplicates (PermissionMetadataView, SaveUserPermissionsForm, UserPermissionAsset, UserPermissionHelper)
  2. Rename PermissionMetadata→PermissionMetadataView following dotCMS naming conventions for REST views
  3. Replace switch statement with Function map in convertPermissionNamesToBits(), rename systemUser→user parameter
…ement-rest-api-save-user-permissions-endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement REST API: Save User Permissions Endpoint

3 participants