dify/web/app/components/header
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): clean up unused production code (#37854) 2026-06-24 07:10:17 +00:00
account-about feat(web): create system-features vertical (#36894) 2026-06-01 10:15:25 +00:00
account-dropdown chore(web): remove unused frontend code (#37866) 2026-06-24 09:25:52 +00:00
account-setting feat: add visibility control for plugin datasource credentials 2026-06-25 00:00:40 +09:00
assets feat: RBAC (#37107) 2026-06-18 16:35:29 +00:00
env-nav refactor: migrate to tailwind v4 style (#36417) 2026-05-20 03:39:44 +00:00
github-star refactor: use ungh for github api (#34108) 2026-03-26 14:37:17 +08:00
license-env feat(web): create system-features vertical (#36894) 2026-06-01 10:15:25 +00:00
plan-badge feat(web): refine onboarding UI (#37433) 2026-06-15 08:47:15 +00:00
plugins-nav chore(web): clean up unused production code (#37854) 2026-06-24 07:10:17 +00:00
utils refactor(custom): reorganize web app brand module and raise coverage threshold (#33531) 2026-03-16 18:17:21 +08:00
header-wrapper.tsx refactor(web): migrate shared localStorage to createLocalStorageState (#37408) 2026-06-19 13:51:45 +00:00
index.module.css chore: clean up useless tailwind reference (#34478) 2026-04-02 11:45:19 +00:00
maintenance-notice.tsx refactor(web): migrate shared localStorage to createLocalStorageState (#37408) 2026-06-19 13:51:45 +00:00
storage.ts refactor(web): migrate shared localStorage to createLocalStorageState (#37408) 2026-06-19 13:51:45 +00:00