[PR #784] [MERGED] fix: frontend permission check #22682

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

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify/pull/784
Author: @MatriQ
Created: 8/9/2023
Status: Merged
Merged: 8/15/2023
Merged by: @crazywoola

Base: mainHead: fix/fe-permission-check


📝 Commits (2)

📊 Changes

19 files changed (+186 additions, -74 deletions)

View changed files

📝 api/services/workspace_service.py (+14 -3)
📝 web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout.tsx (+14 -7)
📝 web/app/(commonLayout)/apps/AppCard.tsx (+4 -2)
📝 web/app/(commonLayout)/apps/Apps.tsx (+4 -2)
📝 web/app/(commonLayout)/datasets/Datasets.tsx (+3 -2)
📝 web/app/components/app/overview/appCard.tsx (+22 -12)
📝 web/app/components/app/overview/share-link.tsx (+4 -2)
📝 web/app/components/develop/secret-key/secret-key-modal.tsx (+10 -8)
📝 web/app/components/header/account-setting/data-source-page/data-source-notion/index.tsx (+15 -5)
📝 web/app/components/header/account-setting/key-validator/Operate.tsx (+10 -8)
📝 web/app/components/header/account-setting/key-validator/index.tsx (+4 -1)
📝 web/app/components/header/account-setting/members-page/index.tsx (+7 -9)
📝 web/app/components/header/account-setting/plugin-page/SerpapiPlugin.tsx (+3 -0)
📝 web/app/components/header/app-selector/index.tsx (+4 -1)
📝 web/app/components/header/index.tsx (+5 -1)
📝 web/app/components/header/nav/nav-selector/index.tsx (+4 -2)
📝 web/context/app-context.tsx (+47 -9)
📝 web/models/common.ts (+7 -0)
📝 web/service/common.ts (+5 -0)

📄 Description

There are many places that do not hide UI elements that should be hidden when users do not have permission to access them.

  • Hide Create New App for normal members, Hide Delete button for apps:

image

  • Disable buttons for normal members:

image
image

  • Hide Proptps Eng. for normal members:

image

  • Disable Invite for workspace members:

image

  • Disable Add workspace for data source:

image

  • Hide Dataset:

image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify/pull/784 **Author:** [@MatriQ](https://github.com/MatriQ) **Created:** 8/9/2023 **Status:** ✅ Merged **Merged:** 8/15/2023 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `fix/fe-permission-check` --- ### 📝 Commits (2) - [`244c8b7`](https://github.com/langgenius/dify/commit/244c8b721af80fd39bcc752154e8d7d88b82b3cf) fix: fontend permission check - [`847f81b`](https://github.com/langgenius/dify/commit/847f81b01050d04eeae72be084cffa3d84ba0a28) fix: address comment ### 📊 Changes **19 files changed** (+186 additions, -74 deletions) <details> <summary>View changed files</summary> 📝 `api/services/workspace_service.py` (+14 -3) 📝 `web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout.tsx` (+14 -7) 📝 `web/app/(commonLayout)/apps/AppCard.tsx` (+4 -2) 📝 `web/app/(commonLayout)/apps/Apps.tsx` (+4 -2) 📝 `web/app/(commonLayout)/datasets/Datasets.tsx` (+3 -2) 📝 `web/app/components/app/overview/appCard.tsx` (+22 -12) 📝 `web/app/components/app/overview/share-link.tsx` (+4 -2) 📝 `web/app/components/develop/secret-key/secret-key-modal.tsx` (+10 -8) 📝 `web/app/components/header/account-setting/data-source-page/data-source-notion/index.tsx` (+15 -5) 📝 `web/app/components/header/account-setting/key-validator/Operate.tsx` (+10 -8) 📝 `web/app/components/header/account-setting/key-validator/index.tsx` (+4 -1) 📝 `web/app/components/header/account-setting/members-page/index.tsx` (+7 -9) 📝 `web/app/components/header/account-setting/plugin-page/SerpapiPlugin.tsx` (+3 -0) 📝 `web/app/components/header/app-selector/index.tsx` (+4 -1) 📝 `web/app/components/header/index.tsx` (+5 -1) 📝 `web/app/components/header/nav/nav-selector/index.tsx` (+4 -2) 📝 `web/context/app-context.tsx` (+47 -9) 📝 `web/models/common.ts` (+7 -0) 📝 `web/service/common.ts` (+5 -0) </details> ### 📄 Description There are many places that do not hide UI elements that should be hidden when users do not have permission to access them. * Hide `Create New App` for normal members, Hide `Delete` button for apps: > ![image](https://github.com/langgenius/dify/assets/1320925/2fdfa8c9-9fa6-4186-80fe-a514ddea2ab0) * Disable buttons for normal members: > ![image](https://github.com/langgenius/dify/assets/1320925/4340b7ec-1d3a-4330-ade4-c0515710fdbb) > ![image](https://github.com/langgenius/dify/assets/1320925/7be45933-df8e-44c4-99d6-5d4b667f0f4a) * Hide `Proptps Eng.` for normal members: > ![image](https://github.com/langgenius/dify/assets/1320925/f7ca61c1-fb54-49b6-839b-d4450ed0599d) * Disable `Invite` for workspace members: > ![image](https://github.com/langgenius/dify/assets/1320925/efd214a8-3411-45e4-b3c0-66e3e1c92b9f) * Disable `Add workspace` for data source: > ![image](https://github.com/langgenius/dify/assets/1320925/46732f15-d7de-444a-b019-a90bb5f62ee0) * Hide `Dataset`: > ![image](https://github.com/langgenius/dify/assets/1320925/f51db976-fd83-49a5-a12e-d4aecefd5cde) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-21 20:19:31 -05:00
yindo closed this issue 2026-02-21 20:19:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22682