Skip to content

Conversation

@nicobytes
Copy link
Contributor

@nicobytes nicobytes commented Jan 27, 2026

This commit introduces a new Permissions tab in the Edit Content Sidebar, allowing users to manage content permissions. Key changes include:

  • Added DotEditContentSidebarPermissionsComponent to render the permissions card.
  • Implemented a dialog for editing permissions using DotPermissionsDialogComponent.
  • Updated the sidebar component to include the new permissions tab and handle tab changes.
  • Enhanced tests to cover the new permissions functionality and ensure accessibility.

This update improves the content editing experience by providing a dedicated section for permissions management.

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)
permissions.mp4

#34387

This PR fixes: #34387

This commit introduces a new Permissions tab in the Edit Content Sidebar, allowing users to manage content permissions. Key changes include:

- Added `DotEditContentSidebarPermissionsComponent` to render the permissions card.
- Implemented a dialog for editing permissions using `DotPermissionsDialogComponent`.
- Updated the sidebar component to include the new permissions tab and handle tab changes.
- Enhanced tests to cover the new permissions functionality and ensure accessibility.

This update improves the content editing experience by providing a dedicated section for permissions management.
… dialog template

This commit modifies the `permissions-dialog.component.html` to improve the handling of the iframe source. The change introduces a local variable `src` to store the result of `iframeSrc()`, ensuring that the iframe is only rendered if `src` is defined. This enhancement contributes to better template clarity and prevents potential rendering issues when the source is not available.
@semgrep-code-dotcms-test
Copy link

Semgrep found 2 ssc-4fd3a3fc-acff-4277-9d88-60469f5a4fa5 findings:

  • core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/dot-edit-content-sidebar.component.ts
  • core-web/libs/edit-content/src/lib/components/dot-edit-content-layout/dot-edit-content.layout.component.ts

Risk: Affected versions of @angular/compiler and @angular/core are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). Angular's template compiler fails to classify the href and xlink:href attributes on SVG <script> elements as Resource URL contexts. This allows an attacker to bind a malicious data: URI or external script via [attr.href] or [attr.xlink:href], resulting in arbitrary JavaScript execution (XSS) in the victim's browser.

Fix: Upgrade this library to at least version 20.3.16 at core/core-web/yarn.lock:512.

Reference(s): GHSA-jrmj-c5cx-3cw6, CVE-2026-22610

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a new Permissions tab to the Edit Content Sidebar, enabling users to manage content permissions directly from the sidebar interface. The implementation follows Angular best practices and includes comprehensive test coverage.

Changes:

  • Added a new Permissions tab in the Edit Content Sidebar with iframe-based permissions management
  • Implemented dialog component for editing permissions with proper accessibility features
  • Added translation keys for permissions UI elements
  • Enhanced test suite to cover permissions functionality including edge cases and accessibility

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
dotCMS/src/main/webapp/html/portlet/ext/contentlet/permissions.jsp New JSP file that loads contentlet data and renders permissions interface within an iframe
dotCMS/src/main/webapp/WEB-INF/messages/Language.properties Added three new translation keys for permissions tab UI
core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/dot-edit-content-sidebar.component.ts Updated sidebar component to import and integrate the new permissions component
core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/dot-edit-content-sidebar.component.spec.ts Added comprehensive tests for permissions tab functionality, navigation, and edge cases
core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/dot-edit-content-sidebar.component.html Added new permissions tab panel to the sidebar template with proper data bindings
core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-permissions/dot-edit-content-sidebar-permissions.component.ts New component that renders permissions card and manages dialog lifecycle
core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-permissions/dot-edit-content-sidebar-permissions.component.spec.ts Comprehensive test suite for permissions component including accessibility tests
core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-permissions/dot-edit-content-sidebar-permissions.component.html Template with accessible card component that opens permissions dialog
core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-permissions/components/permissions-dialog/permissions-dialog.component.ts Dialog component that displays permissions in an iframe with URL sanitization
core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-permissions/components/permissions-dialog/permissions-dialog.component.spec.ts Tests for permissions dialog including iframe rendering and edge cases
core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-permissions/components/permissions-dialog/permissions-dialog.component.html Dialog template with iframe or empty state based on data validity
core-web/libs/edit-content/src/lib/components/dot-edit-content-layout/dot-edit-content.layout.component.ts Added DynamicDialogModule import and minor import reordering

…nhance permissions dialog error handling

This commit removes the unused `DotMessageService` from the `DotEditContentSidebarComponent`, streamlining the component's dependencies. Additionally, it improves error handling in the `DotEditContentSidebarPermissionsComponent` by adding error logging when closing the permissions dialog, enhancing the robustness of the dialog's functionality.
…for-new-edit-mode' of github.com:dotCMS/core into 34387-spike-investigate-permissions-iframe-integration-for-new-edit-mode
…alog from opening

This commit enhances the `DotEditContentSidebarPermissionsComponent` by adding a check to prevent multiple instances of the permissions dialog from being opened when the user clicks the card repeatedly. This improvement ensures a smoother user experience and avoids potential conflicts in dialog handling.
@nicobytes nicobytes enabled auto-merge January 28, 2026 00:39
@nicobytes nicobytes added this pull request to the merge queue Jan 28, 2026
Merged via the queue into main with commit 545f9b8 Jan 28, 2026
39 checks passed
@nicobytes nicobytes deleted the 34387-spike-investigate-permissions-iframe-integration-for-new-edit-mode branch January 28, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[SPIKE] Investigate Permissions Iframe integration for New Edit Mode

4 participants