Skip to content

Fix #24801 Adding a fix to handle content type permission inheritance… - #24997

Merged
nollymar merged 18 commits into
release-23.06from
issue-24801-allow-wf-rest-publish-limiteduser-23-06
May 26, 2023
Merged

Fix #24801 Adding a fix to handle content type permission inheritance…#24997
nollymar merged 18 commits into
release-23.06from
issue-24801-allow-wf-rest-publish-limiteduser-23-06

Conversation

@jdotcms

@jdotcms jdotcms commented May 19, 2023

Copy link
Copy Markdown
Contributor

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

@jdotcms
jdotcms marked this pull request as ready for review May 24, 2023 20:11
Comment thread dotCMS/src/main/java/com/dotcms/rest/api/v1/user/UserResource.java Outdated
Comment thread dotCMS/src/main/webapp/html/portlet/ext/common/edit_permissions_tab_js_inc.jsp Outdated
jdotcms added 2 commits May 24, 2023 15:59
… github.com:dotCMS/core into issue-24801-allow-wf-rest-publish-limiteduser-23-06
@ghost

ghost commented May 24, 2023

Copy link
Copy Markdown

SonarQube Quality Gate

Quality Gate failed

Failed condition C Reliability Rating on New Code (is worse than A)
Failed condition 0.0% 0.0% Coverage on New Code (is less than 80%)

See analysis details on SonarQube

Fix issues before they fail your Quality Gate with SonarLint SonarLint in your IDE.

@nollymar
nollymar merged commit 5403352 into release-23.06 May 26, 2023
@nollymar
nollymar deleted the issue-24801-allow-wf-rest-publish-limiteduser-23-06 branch May 26, 2023 14:57
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.
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.

5 participants