Fix #24801 Adding a fix to handle content type permission inheritance… - #24997
Merged
nollymar merged 18 commits intoMay 26, 2023
Merged
Conversation
…wner content type permissions
…is new (or at least has just one version)
…n test to create a limited user
…as it is and adds the layouts over the limited role assigned too, to the limited user; finally fixing a lot of curl test
jdotcms
marked this pull request as ready for review
May 24, 2023 20:11
jcastro-dotcms
requested changes
May 24, 2023
dsilvam
approved these changes
May 24, 2023
… github.com:dotCMS/core into issue-24801-allow-wf-rest-publish-limiteduser-23-06
|
SonarQube Quality Gate
See analysis details on SonarQube Fix issues before they fail your Quality Gate with |
jcastro-dotcms
approved these changes
May 25, 2023
7 tasks
hassandotcms
added a commit
to hassandotcms/core
that referenced
this pull request
Aug 28, 2026
…GET /v1/roles/layouts `RoleResource#getAllLayouts` was the only endpoint on the resource without a `WebResource.InitBuilder` gate, so anonymous callers received the full tool-group catalog (layout ids, names, portlet ids, localized portlet titles). Public since v23.06 (dotCMS#24997), where the write twin `saveRoleLayouts` did get the gate. - Add the same InitBuilder block every sibling uses: requiredBackendUser, requiredPortlet("roles"), rejectWhenNoUser. - Pass the authenticated user from InitDataObject to getPorletTitlesFromLayout instead of re-resolving it from the request; the null-user fallback in LanguageUtil is what let the anonymous call survive. getAllLayouts was the helper's only caller. - Swagger: state the requirement in the description and on the 401 response (the gate emits 401 for every rejection); regenerate openapi.yaml. - ITs: anonymous -> 401, backend user without roles portlet -> 401, non-admin roles-portlet user -> 200 with unchanged payload shape, admin -> 200.
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
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.




Trying to migrate the issue-24801-allow-wf-rest-publish-limiteduser to 23.06