-
Couldn't load subscription status.
- Fork 478
Implement rest api save user permissions endpoint [#33393] #33426
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
Open
hassandotcms
wants to merge
29
commits into
main
Choose a base branch
from
33393-implement-rest-api-save-user-permissions-endpoint
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Implement rest api save user permissions endpoint [#33393] #33426
hassandotcms
wants to merge
29
commits into
main
from
33393-implement-rest-api-save-user-permissions-endpoint
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
…user. (#33345) - add new response view class.
…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.
…user. (#33345) update api docs.
…user. (#33345) add postman test.
…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) fix integ tests
… user. (#33345) - Return specific response type instead of generic Response - Add better documentation and error messages - Split user loading into separate helper method
… user. (#33345) refactoring and cleanup.
…ement-rest-api-get-user-permissions-endpoint
…user. (#33345) move helper method to helper class.
…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) fix constructor init issue.
…tadata. (#33394) add postman test for permission metadata api
…ement-rest-api-get-permission-metadata
- 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
…ement-rest-api-get-permission-metadata
…33393-implement-rest-api-save-user-permissions-endpoint
44c897b to
4106e61
Compare
jdotcms
reviewed
Oct 10, 2025
dotCMS/src/main/java/com/dotcms/rest/api/v1/system/permission/PermissionMetadata.java
Outdated
Show resolved
Hide resolved
jdotcms
reviewed
Oct 10, 2025
dotCMS/src/main/java/com/dotcms/rest/api/v1/system/permission/PermissionMetadata.java
Outdated
Show resolved
Hide resolved
jdotcms
reviewed
Oct 10, 2025
dotCMS/src/main/java/com/dotcms/rest/api/v1/user/SaveUserPermissionsForm.java
Outdated
Show resolved
Hide resolved
jdotcms
reviewed
Oct 10, 2025
dotCMS/src/main/java/com/dotcms/rest/api/v1/user/UserPermissionHelper.java
Show resolved
Hide resolved
jdotcms
reviewed
Oct 10, 2025
dotCMS/src/main/java/com/dotcms/rest/api/v1/user/UserPermissionHelper.java
Show resolved
Hide resolved
jdotcms
reviewed
Oct 10, 2025
| * @throws DotDataException if asset resolution fails | ||
| * @throws DotSecurityException if security check fails | ||
| */ | ||
| public Permissionable resolveAsset(final String assetId, final User systemUser) |
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.
should rename system user as a just user
jdotcms
reviewed
Oct 10, 2025
dotCMS/src/main/java/com/dotcms/rest/api/v1/user/UserPermissionHelper.java
Show resolved
Hide resolved
jdotcms
approved these changes
Oct 10, 2025
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
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
fixes #33393