dify/web/service
kota-maeda0708 c232375fd2 feat: add visibility control for plugin datasource credentials
Plugin-based datasource credentials (Notion, Jina, Firecrawl, etc.) were
implicitly shared with every workspace member. PR #35468 added the
visibility column, creator tracking and read-side filtering for datasource
providers, but left no way to actually set or change a credential's scope,
so every datasource credential stayed effectively all_team_members.

This completes the datasource side:

Backend:
- add_datasource_api_key_provider / add_datasource_oauth_provider accept
  user_id and visibility; API keys default to all_team_members, OAuth
  defaults to only_me (matching the plugin-credential philosophy)
- new update_datasource_credential_visibility (+ console endpoint) so the
  creator can switch between only_me / all_team_members / partial_members;
  only the creator (or legacy NULL-owner rows) may change the scope
- replace_partial_member_list / clear_partial_member_list helpers on
  CredentialPermissionService (caller owns the transaction)
- list_datasource_credentials returns visibility, user_id, is_editable and
  partial_member_list

Frontend:
- VisibilityModal reusing PermissionSelector, with an empty-partial-members
  guard (the backend rejects an empty list)
- "Who can use" action in the credential operator, gated on is_editable
- scope badges (only me / partial team members) on the credential item

Existing credentials keep working: the visibility column defaults to
all_team_members and legacy rows with a NULL owner are always visible.
2026-06-25 00:00:40 +09:00
..
__tests__ chore(web): remove unused frontend code (#37866) 2026-06-24 09:25:52 +00:00
access-control feat: RBAC (#37107) 2026-06-18 16:35:29 +00:00
knowledge feat: RBAC (#37107) 2026-06-18 16:35:29 +00:00
_tools_util.spec.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
_tools_util.ts fix: properly escape collectionName in query string parameters (#14476) 2025-02-27 18:59:07 +08:00
annotation.spec.ts feat(web): allow annotation reply score threshold below 0.8 (#36337) 2026-05-18 10:05:13 +00:00
annotation.ts feat(web): allow annotation reply score threshold below 0.8 (#36337) 2026-05-18 10:05:13 +00:00
apps.ts feat: RBAC (#37107) 2026-06-18 16:35:29 +00:00
base.spec.ts feat(chatflow): stream LLM reasoning to a live thinking panel (#37460) 2026-06-23 09:49:01 +00:00
base.ts feat(chatflow): stream LLM reasoning to a live thinking panel (#37460) 2026-06-23 09:49:01 +00:00
billing.ts chore: seprate vector space quota query (#36514) 2026-05-22 09:26:17 +00:00
client.spec.ts chore(agent-v2): sync nightly updates to main (2026-06-18) (#37610) 2026-06-18 15:34:51 +00:00
client.ts chore(agent-v2): sync nightly updates to main (2026-06-18) (#37610) 2026-06-18 15:34:51 +00:00
common.ts chore(knip): add mdx support clean unused code (#37882) 2026-06-24 12:30:11 +00:00
datasets.ts chore(web): remove unused frontend code (#37866) 2026-06-24 09:25:52 +00:00
debug.spec.ts feat: enhance go to anything (#32130) 2026-06-04 11:06:17 +00:00
debug.ts feat: enhance go to anything (#32130) 2026-06-04 11:06:17 +00:00
device-flow.ts feat: adding dify cli (#36348) 2026-05-26 01:12:36 +00:00
explore.ts feat(web): refine onboarding UI (#37433) 2026-06-15 08:47:15 +00:00
fetch.spec.ts feat: snippet (#37046) 2026-06-05 09:38:42 +00:00
fetch.ts feat: RBAC (#37107) 2026-06-18 16:35:29 +00:00
log.ts refactor(web): migrate log service to TanStack Query (#30065) 2025-12-24 15:25:28 +08:00
marketplace-templates.ts feat: marketplace and oauth fixes (#35509) 2026-04-24 07:53:14 +00:00
plugins.ts chore: knip fix (#34481) 2026-04-02 15:03:42 +00:00
refresh-token.ts refactor(web): remove app initializer and move auth boot logic to route boundaries (#36818) 2026-05-29 12:26:34 +00:00
server.ts feat(web): add server oRPC client (#36856) 2026-05-31 13:14:28 +00:00
share.ts feat(api): introduce select, file and file list form input types to Human Input node (#36322) 2026-06-04 01:54:28 +00:00
sso.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
strategy.ts Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
tools.ts refactor(web): converge overlay layering on dify-ui z-50 (#35976) 2026-05-09 12:18:39 +00:00
try-app.spec.ts fix: remove enable for get (#35245) 2026-04-15 09:18:29 +00:00
try-app.ts fix: remove enable for get (#35245) 2026-04-15 09:18:29 +00:00
use-apps.ts feat: RBAC (#37107) 2026-06-18 16:35:29 +00:00
use-base.ts refactor(web): consolidate query/mutation guidance and deprecate use-base wrappers (#33456) 2026-03-16 13:38:29 +08:00
use-billing.ts chore: seprate vector space quota query (#36514) 2026-05-22 09:26:17 +00:00
use-common.ts chore(web): clean up unused production code (#37854) 2026-06-24 07:10:17 +00:00
use-dataset-card.ts refactor: restructure DatasetCard component for improved readability and maintainability (#30617) 2026-01-06 21:57:21 +08:00
use-datasource.ts feat: add visibility control for plugin datasource credentials 2026-06-25 00:00:40 +09:00
use-education.ts fix: correct useEducationStatus query cache configuration (#30416) 2025-12-31 13:51:05 +08:00
use-endpoints.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-explore.ts feat: RBAC (#37107) 2026-06-18 16:35:29 +00:00
use-flow.ts chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
use-log.ts refactor: add console client migration demo (#36300) 2026-05-18 07:41:23 +00:00
use-models.ts chore: integrate @tanstack/eslint-plugin-query and fix service layer lint errors (#30444) 2026-01-04 11:20:06 +08:00
use-oauth.ts chore: knip fix (#34481) 2026-04-02 15:03:42 +00:00
use-pipeline.ts refactor(api): migrate console.app.workflow to BaseModel (#36216) 2026-05-18 07:31:37 +00:00
use-plugins-auth.ts feat: per-credential visibility control for plugin credentials (#35468) 2026-06-01 05:56:18 +00:00
use-plugins.ts feat: RBAC (#37107) 2026-06-18 16:35:29 +00:00
use-share.spec.tsx feat: frontend part of support try apps (#31287) 2026-01-22 18:16:37 +08:00
use-share.ts feat(api): introduce select, file and file list form input types to Human Input node (#36322) 2026-06-04 01:54:28 +00:00
use-snippet-workflows.ts chore(web): remove unused frontend code (#37866) 2026-06-24 09:25:52 +00:00
use-snippets.ts feat: snippet (#37046) 2026-06-05 09:38:42 +00:00
use-strategy.ts chore: knip fix (#34481) 2026-04-02 15:03:42 +00:00
use-tools.ts feat: RBAC (#37107) 2026-06-18 16:35:29 +00:00
use-triggers.ts chore: knip fix (#34481) 2026-04-02 15:03:42 +00:00
use-try-app.ts feat: frontend part of support try apps (#31287) 2026-01-22 18:16:37 +08:00
use-workflow.ts refactor(api): migrate console.app.workflow to BaseModel (#36216) 2026-05-18 07:31:37 +00:00
use-workspace.ts feat: ee workspace permission control (#30841) 2026-01-19 11:06:04 +08:00
utils.spec.ts feat: snippet (#37046) 2026-06-05 09:38:42 +00:00
utils.ts feat: snippet (#37046) 2026-06-05 09:38:42 +00:00
webapp-auth.ts chore: knip fix (#34481) 2026-04-02 15:03:42 +00:00
workflow.ts feat(api): introduce select, file and file list form input types to Human Input node (#36322) 2026-06-04 01:54:28 +00:00