[PR #4435] feat: new editor user permission profile #24527

Closed
opened 2026-02-21 20:23:10 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/4435

State: closed
Merged: Yes


Description

This change introduces a new user permission profile called "editor" in the Dify workspace. The editor role can add and edit apps within the workspace, but does not have permission to manage certain workspace-level settings such as adding API keys, changing workspace models and tools, or enabling/disabling the API endpoint. However, editors can turn on/off and manage the published site for apps they have access to.

In addition, this change disallows normal users and editors to view logs, enhancing the security of the workspace.

The implementation also streamlines some places where permission checking was not using helper functions, and adds disabled states on the frontend for actions that editors do not have permission to perform.

Fixes # (issue)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement

How Has This Been Tested?

  • Verified editors can create and edit apps
  • Confirmed editors cannot access workspace settings they don't have permission for
  • Tested that editors can manage published app websites
  • Checked disabled states appear correctly on frontend for editor role

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes
**Original Pull Request:** https://github.com/langgenius/dify/pull/4435 **State:** closed **Merged:** Yes --- # Description This change introduces a new user permission profile called "editor" in the Dify workspace. The editor role can add and edit apps within the workspace, but does not have permission to manage certain workspace-level settings such as adding API keys, changing workspace models and tools, or enabling/disabling the API endpoint. However, editors can turn on/off and manage the published site for apps they have access to. In addition, this change disallows normal users and editors to view logs, enhancing the security of the workspace. The implementation also streamlines some places where permission checking was not using helper functions, and adds disabled states on the frontend for actions that editors do not have permission to perform. Fixes # (issue) ## Type of Change - [x] New feature (non-breaking change which adds functionality) - [x] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement # How Has This Been Tested? - [x] Verified editors can create and edit apps - [x] Confirmed editors cannot access workspace settings they don't have permission for - [x] Tested that editors can manage published app websites - [x] Checked disabled states appear correctly on frontend for editor role # Suggested Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods - [ ] `optional` I have made corresponding changes to the documentation - [ ] `optional` I have added tests that prove my fix is effective or that my feature works - [ ] `optional` New and existing unit tests pass locally with my changes
yindo added the pull-request label 2026-02-21 20:23:10 -05:00
yindo closed this issue 2026-02-21 20:23:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#24527