[PR #5266] feat: permission and security fixes #24849

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

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

State: closed
Merged: Yes


Description

This PR resolves the following issues:

  1. The FireCrawl implementation currently lacks generalization in terms of naming. It also returns the API key back to the front end, which is unnecessary and poses a security risk. This PR addresses these issues by improving the naming conventions and removing the API key from the front-end response.
  2. This PR adds checking for editor/manager permissions on the front-end UI and hides unnecessary editing options from Viewers and Editors. Specifically:
    • The tag editor is hidden for Viewers.
    • The App Info dropdown panel is hidden for Viewers.
    • The FireCrawl settings are hidden from Viewers and Editors.
  3. The app name and icon editing APIs are now secured to require at least Editor permissions.
  4. The workflow APIs are now secured to require at least Editor permissions.

These changes enhance the security and user experience of the application by restricting access to sensitive information, providing a more tailored interface based on user roles, and securing critical APIs to prevent unauthorized modifications.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Tested the FireCrawl implementation to ensure that the API key is no longer returned to the front end.
  • Verified that the tag editor, App Info dropdown panel, and FireCrawl settings are correctly hidden for Viewers and Editors based on their permissions.
  • Tested the app name and icon editing APIs to ensure that they require at least Editor permissions.
  • Tested the workflow APIs to ensure that they require at least Editor permissions.
  • Conducted thorough manual testing to ensure that the changes do not introduce any new issues or break existing functionality.

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.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • [] New and existing unit tests pass locally with my changes.
**Original Pull Request:** https://github.com/langgenius/dify/pull/5266 **State:** closed **Merged:** Yes --- # Description This PR resolves the following issues: 1. The FireCrawl implementation currently lacks generalization in terms of naming. It also returns the API key back to the front end, which is unnecessary and poses a security risk. This PR addresses these issues by improving the naming conventions and removing the API key from the front-end response. 2. This PR adds checking for editor/manager permissions on the front-end UI and hides unnecessary editing options from Viewers and Editors. Specifically: - The tag editor is hidden for Viewers. - The App Info dropdown panel is hidden for Viewers. - The FireCrawl settings are hidden from Viewers and Editors. 3. The app name and icon editing APIs are now secured to require at least Editor permissions. 4. The workflow APIs are now secured to require at least Editor permissions. These changes enhance the security and user experience of the application by restricting access to sensitive information, providing a more tailored interface based on user roles, and securing critical APIs to prevent unauthorized modifications. ## Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) # How Has This Been Tested? - [x] Tested the FireCrawl implementation to ensure that the API key is no longer returned to the front end. - [x] Verified that the tag editor, App Info dropdown panel, and FireCrawl settings are correctly hidden for Viewers and Editors based on their permissions. - [x] Tested the app name and icon editing APIs to ensure that they require at least Editor permissions. - [x] Tested the workflow APIs to ensure that they require at least Editor permissions. - [x] Conducted thorough manual testing to ensure that the changes do not introduce any new issues or break existing functionality. # 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. - [ ] I have made corresponding changes to the documentation. - [ ] I have added tests that prove my fix is effective or that my feature works. - [] New and existing unit tests pass locally with my changes.
yindo added the pull-request label 2026-02-21 20:23:48 -05:00
yindo closed this issue 2026-02-21 20:23:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#24849