Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore: Revert "feat: use app.acl.access_point_manage to control access point page access" (#41563)

Joel5cbc42cd389b
diff --git a/api/controllers/console/agent/roster.py b/api/controllers/console/agent/roster.py
index 730dd7b1a57..f95f9d8b00f 100644
--- a/api/controllers/console/agent/roster.py
+++ b/api/controllers/console/agent/roster.py
@@ -7,7 +7,6 @@ from pydantic import AliasChoices, BaseModel, Field, field_validator
from sqlalchemy import func, or_, select
from sqlalchemy.orm import Session
-from configs import dify_config
from controllers.common.schema import (
query_params_from_model,
query_params_from_request,
@@ -79,11 +78,9 @@ from services.agent.observability_service import (
)
from services.agent.roster_service import AgentRosterService
from services.app_service import AgentAppPublicationCounts, AppListParams, AppService, CreateAppParams
-from services.enterprise import rbac_service as enterprise_rbac_service
from services.enterprise.enterprise_service import EnterpriseService
from services.entities.agent_entities import ComposerSavePayload, RosterListQuery
from services.feature_service import FeatureService
-from tasks.initialize_created_app_rbac_access_task import initialize_created_app_rbac_access_task
AgentPublicationStatus = Literal["published", "drafts"]
@@ -687,15 +684,6 @@ class AgentAppListApi(Resource):
)
app = AppService().create_app(current_tenant_id, params, current_user, session=session)
- if dify_config.RBAC_ENABLED:
- enterprise_rbac_service.RBACService.AppAccess.replace_whitelist(
- current_tenant_id,
- current_user.id,
- str(app.id),
- enterprise_rbac_service.ReplaceMemberBindings(automatic_include_workspace_members=True),
- )
- initialize_created_app_rbac_access_task.delay(current_tenant_id, current_user.id, app_id=app.id)
-
return _serialize_agent_app_detail(session, app, current_user=current_user), 201
diff --git a/api/services/enterprise/rbac_service.py b/api/services/enterprise/rbac_service.py
index bf95b8650b1..fd0acf280b2 100644
--- a/api/services/enterprise/rbac_service.py
+++ b/api/services/enterprise/rbac_service.py
@@ -477,7 +477,6 @@ _LEGACY_WORKSPACE_DATASET_OPERATOR_KEYS: list[str] = [
_LEGACY_APP_OWNER_KEYS: list[str] = [
"app.acl.preview",
- "app.acl.access_point_manage",
"app.acl.view_layout",
"app.acl.test_and_run",
"app.acl.edit",
@@ -493,7 +492,6 @@ _LEGACY_APP_OWNER_KEYS: list[str] = [
_LEGACY_APP_ADMIN_KEYS: list[str] = [
"app.acl.preview",
"app.acl.view_layout",
- "app.acl.access_point_manage",
"app.acl.test_and_run",
"app.acl.edit",
"app.acl.import_export_dsl",
@@ -508,7 +506,6 @@ _LEGACY_APP_ADMIN_KEYS: list[str] = [
_LEGACY_APP_EDITOR_KEYS: list[str] = [
"app.acl.preview",
- "app.acl.access_point_manage",
"app.acl.view_layout",
"app.acl.test_and_run",
"app.acl.edit",
diff --git a/api/tests/unit_tests/controllers/console/agent/test_agent_controllers.py b/api/tests/unit_tests/controllers/console/agent/test_agent_controllers.py
index 27a543fd2a2..c2b43d8cb22 100644
--- a/api/tests/unit_tests/controllers/console/agent/test_agent_controllers.py
+++ b/api/tests/unit_tests/controllers/console/agent/test_agent_controllers.py
@@ -1,4 +1,3 @@
-from collections.abc import Callable
from datetime import datetime
from inspect import getsource, unwrap
from types import SimpleNamespace
@@ -309,15 +308,9 @@ def account_id() -> str:
def test_agent_app_list_and_create_use_agent_route(
- app: Flask,
- monkeypatch: pytest.MonkeyPatch,
- account_id: str,
- sqlite_session: Session,
- config_overrides: Callable[..., None],
+ app: Flask, monkeypatch: pytest.MonkeyPatch, account_id: str, sqlite_session: Session
) -> None:
captured: dict[str, object] = {}
- replace_whitelist = MagicMock()
- initialize_access = MagicMock()
class FakeAppService:
def get_app(self, app_obj: object, *, session: object) -> object:
@@ -403,9 +396,7 @@ def test_agent_app_list_and_create_use_agent_route(
lambda _self, **kwargs: {"agent-list": "debug-conversation-list"},
)
monkeypatch.setattr(
- roster_controller.AgentRosterService,
- "count_agent_app_debug_conversation_messages",
- lambda _self, **kwargs: 0,
+ roster_controller.AgentRosterService, "count_agent_app_debug_conversation_messages", lambda _self, **kwargs: 0
)
def get_or_create_debug_conversation(_self: object, **kwargs: object) -> str:
@@ -422,13 +413,6 @@ def test_agent_app_list_and_create_use_agent_route(
"get_system_features",
lambda: SimpleNamespace(webapp_auth=SimpleNamespace(enabled=False)),
)
- config_overrides(RBAC_ENABLED=True)
- monkeypatch.setattr(
- roster_controller.enterprise_rbac_service.RBACService.AppAccess,
- "replace_whitelist",
- replace_whitelist,
- )
- monkeypatch.setattr(roster_controller.initialize_created_app_rbac_access_task, "delay", initialize_access)
with app.test_request_context(
"/console/api/agent?page=1&limit=10&mode=workflow&sort_by=recently_created"
"&is_created_by_me=true&publication_status=published"
@@ -469,22 +453,12 @@ def test_agent_app_list_and_create_use_agent_route(
assert count_params.agent_is_published is True
with app.test_request_context(
"/console/api/agent",
- json={
- "name": "Iris",
- "description": "Agent app",
- "role": "Coordinator",
- "icon_type": "emoji",
- "icon": "robot",
- },
+ json={"name": "Iris", "description": "Agent app", "role": "Coordinator", "icon_type": "emoji", "icon": "robot"},
):
created, status = unwrap(AgentAppListApi.post)(
AgentAppListApi(),
AgentAppCreatePayload(
- name="Iris",
- description="Agent app",
- role="Coordinator",
- icon_type="emoji",
- icon="robot",
+ name="Iris", description="Agent app", role="Coordinator", icon_type="emoji", icon="robot"
),
sqlite_session,
"tenant-1",
@@ -507,81 +481,6 @@ def test_agent_app_list_and_create_use_agent_route(
"account_id": account_id,
"commit": False,
}
- replace_whitelist.assert_called_once()
- assert replace_whitelist.call_args.args[:3] == ("tenant-1", account_id, "app-created")
- replace_payload = replace_whitelist.call_args.args[3]
- assert replace_payload.automatic_include_workspace_members is True
- initialize_access.assert_called_once_with("tenant-1", account_id, app_id="app-created")
-
-
-def test_agent_app_create_skips_rbac_access_initialization_when_rbac_is_disabled(
- app: Flask,
- monkeypatch: pytest.MonkeyPatch,
- account_id: str,
- sqlite_session: Session,
- config_overrides: Callable[..., None],
-) -> None:
- replace_whitelist = MagicMock()
- initialize_access = MagicMock()
-
- class FakeAppService:
- def get_app(self, app_obj: object, *, session: object) -> object:
- return app_obj
-
- def create_app(self, tenant_id: str, params, current_user: object, *, session: object) -> object:
- return _app_detail_obj(id="app-created", bound_agent_id="agent-created")
-
- monkeypatch.setattr(roster_controller, "AppService", FakeAppService)
- monkeypatch.setattr(
- roster_controller.AgentRosterService,
- "get_app_backing_agent",
- lambda _self, **kwargs: Agent(
- id="agent-created",
- app_id="app-created",
- backing_app_id=None,
- role="Created role",
- active_config_snapshot_id=None,
- ),
- )
- monkeypatch.setattr(
- roster_controller.AgentRosterService,
- "get_or_create_build_conversation",
- lambda _self, **kwargs: "debug-conversation-created",
- )
- monkeypatch.setattr(
- roster_controller.AgentRosterService, "count_agent_app_debug_conversation_messages", lambda _self, **kwargs: 0
- )
- monkeypatch.setattr(
- roster_controller.FeatureService,
- "get_system_features",
- lambda: SimpleNamespace(webapp_auth=SimpleNamespace(enabled=False)),
- )
- config_overrides(RBAC_ENABLED=False)
- monkeypatch.setattr(
- roster_controller.enterprise_rbac_service.RBACService.AppAccess,
- "replace_whitelist",
- replace_whitelist,
- )
- monkeypatch.setattr(roster_controller.initialize_created_app_rbac_access_task, "delay", initialize_access)
-
- with app.test_request_context(
- "/console/api/agent",
- json={"name": "Iris", "description": "Agent app", "role": "Coordinator", "icon_type": "emoji", "icon": "robot"},
- ):
- created, status = unwrap(AgentAppListApi.post)(
- AgentAppListApi(),
- AgentAppCreatePayload(
- name="Iris", description="Agent app", role="Coordinator", icon_type="emoji", icon="robot"
- ),
- sqlite_session,
- "tenant-1",
- _account(account_id=account_id),
- )
-
- assert status == 201
- assert created["id"] == "agent-created"
- replace_whitelist.assert_not_called()
- initialize_access.assert_not_called()
def test_agent_app_create_payload_allows_optional_role() -> None:
diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/__tests__/layout-main.spec.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/__tests__/layout-main.spec.tsx
index 9a52e32d0e7..8c6acc78866 100644
--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/__tests__/layout-main.spec.tsx
+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/__tests__/layout-main.spec.tsx
@@ -238,11 +238,9 @@ describe('AppDetailLayout', () => {
expect(useStore.getState().appDetail?.id).toBe('app-1')
})
- it('should allow users with access point permission to open access point directly', async () => {
+ it('should allow access point pages without app deploy or app ACL permissions', async () => {
mockPathname = '/app/app-1/access-point'
- mockFetchAppDetailDirect.mockResolvedValue(
- createAppDetail({ permission_keys: [AppACLPermission.AccessPoint] }),
- )
+ mockFetchAppDetailDirect.mockResolvedValue(createAppDetail({ permission_keys: [] }))
render(
<AppDetailLayout appId="app-1">
@@ -256,44 +254,6 @@ describe('AppDetailLayout', () => {
expect(useStore.getState().appDetail?.id).toBe('app-1')
})
- it('should redirect access point pages when access point permission is missing', async () => {
- mockPathname = '/app/app-1/access-point'
- mockFetchAppDetailDirect.mockResolvedValue(
- createAppDetail({ permission_keys: [AppACLPermission.Monitor] }),
- )
-
- render(
- <AppDetailLayout appId="app-1">
- <div>App page content</div>
- </AppDetailLayout>,
- )
-
- await waitFor(() => {
- expect(mockReplace).toHaveBeenCalledWith('/app/app-1/overview')
- })
- expect(screen.queryByText('App page content')).not.toBeInTheDocument()
- expect(useStore.getState().appDetail).toBeUndefined()
- })
-
- it('should keep access point content hidden while redirecting cached app data without permission', async () => {
- mockPathname = '/app/app-1/access-point'
- useStore
- .getState()
- .setAppDetail(createAppDetail({ permission_keys: [AppACLPermission.Monitor] }))
-
- render(
- <AppDetailLayout appId="app-1">
- <div>App page content</div>
- </AppDetailLayout>,
- )
-
- expect(screen.queryByText('App page content')).not.toBeInTheDocument()
- await waitFor(() => {
- expect(mockReplace).toHaveBeenCalledWith('/app/app-1/overview')
- })
- expect(mockFetchAppDetailDirect).not.toHaveBeenCalled()
- })
-
it('should redirect deploy pages when app deploy ACL permission is missing', async () => {
mockPathname = '/app/app-1/deploy'
mockFetchAppDetailDirect.mockResolvedValue(
@@ -357,7 +317,7 @@ describe('AppDetailLayout', () => {
)
await waitFor(() => {
- expect(mockReplace).toHaveBeenCalledWith('/apps')
+ expect(mockReplace).toHaveBeenCalledWith('/app/app-1/access-point')
})
expect(screen.queryByText('App page content')).not.toBeInTheDocument()
expect(useStore.getState().appDetail).toBeUndefined()
@@ -528,7 +488,7 @@ describe('AppDetailLayout', () => {
)
await waitFor(() => {
- expect(mockReplace).toHaveBeenCalledWith('/apps')
+ expect(mockReplace).toHaveBeenCalledWith('/app/app-1/access-point')
})
expect(screen.queryByText('App page content')).not.toBeInTheDocument()
expect(useStore.getState().appDetail).toBeUndefined()
diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout-main.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout-main.tsx
index df55021f289..7f9f6973ca8 100644
--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout-main.tsx
+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout-main.tsx
@@ -78,28 +78,8 @@ const AppDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
appDetail?.id === appId ? appDetail : appDetailRes?.id === appId ? appDetailRes : null
const pageTitle = appDetailPageTitle(pathname, t)
const appName = routeAppDetail?.id === appId ? routeAppDetail.name : undefined
- const isAppACLContextReady =
- !!routeAppDetail &&
- !!currentWorkspace.id &&
- !isLoadingCurrentWorkspace &&
- !isLoadingWorkspacePermissionKeys &&
- !isLoadingAppDetail
- const appACLCapabilities = React.useMemo(
- () =>
- routeAppDetail && isAppACLContextReady
- ? getAppACLCapabilities(routeAppDetail.permission_keys, {
- currentUserId,
- resourceMaintainer: routeAppDetail.maintainer,
- workspacePermissionKeys,
- isRbacEnabled,
- })
- : null,
- [currentUserId, isAppACLContextReady, isRbacEnabled, routeAppDetail, workspacePermissionKeys],
- )
const shouldBlockAgentResourceAccess =
routeAppDetail?.mode === AppModeEnum.AGENT && pathname.endsWith('/access-config')
- const shouldBlockAccessPointAccess =
- pathname.endsWith('/access-point') && !appACLCapabilities?.canAccessPoint
useDocumentTitle(`${pageTitle} · ${appName || t(($) => $['menus.appDetail'], { ns: 'common' })}`)
@@ -140,16 +120,28 @@ const AppDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
}, [appId, router, setAppDetail])
useEffect(() => {
- if (!routeAppDetail || !isAppACLContextReady || !appACLCapabilities) return
+ if (
+ !routeAppDetail ||
+ !currentWorkspace.id ||
+ isLoadingCurrentWorkspace ||
+ isLoadingWorkspacePermissionKeys ||
+ isLoadingAppDetail
+ )
+ return
if (routeAppDetail.id !== appId) return
+ const appACLCapabilities = getAppACLCapabilities(routeAppDetail.permission_keys, {
+ currentUserId,
+ resourceMaintainer: routeAppDetail.maintainer,
+ workspacePermissionKeys,
+ isRbacEnabled,
+ })
const isLayoutPath = pathname.endsWith('configuration') || pathname.endsWith('workflow')
const isLogsPath = pathname.endsWith('logs')
const isAnnotationsPath = pathname.endsWith('annotations')
const isOverviewPath = pathname.endsWith('overview')
const isAccessConfigPath = pathname.endsWith('access-config')
const isDeployPath = pathname.endsWith('deploy')
- const isAccessPointPath = pathname.endsWith('access-point')
if (
(isLayoutPath && !appACLCapabilities.canAccessLayout) ||
(isLogsPath && !appACLCapabilities.canAccessLogAndAnnotation) ||
@@ -158,8 +150,7 @@ const AppDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
(isAccessConfigPath &&
(routeAppDetail.mode === AppModeEnum.AGENT || !appACLCapabilities.canAccessConfig)) ||
(isDeployPath &&
- (routeAppDetail.mode !== AppModeEnum.WORKFLOW || !appACLCapabilities.canDeploy)) ||
- (isAccessPointPath && !appACLCapabilities.canAccessPoint)
+ (routeAppDetail.mode !== AppModeEnum.WORKFLOW || !appACLCapabilities.canDeploy))
) {
router.replace(
getRedirectionPath(routeAppDetail, {
@@ -189,12 +180,14 @@ const AppDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
if (appDetailRes && appDetail?.id !== appDetailRes.id)
setAppDetail({ ...appDetailRes, enable_sso: false })
}, [
- appACLCapabilities,
appDetail?.id,
appDetailRes,
appId,
currentUserId,
- isAppACLContextReady,
+ currentWorkspace.id,
+ isLoadingAppDetail,
+ isLoadingCurrentWorkspace,
+ isLoadingWorkspacePermissionKeys,
isRbacEnabled,
pathname,
routeAppDetail,
@@ -205,7 +198,7 @@ const AppDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
const isWorkflowPage = pathname.endsWith('/workflow')
const content =
- !appDetail || shouldBlockAgentResourceAccess || shouldBlockAccessPointAccess ? (
+ !appDetail || shouldBlockAgentResourceAccess ? (
<div className="flex min-w-0 grow items-center justify-center bg-background-body">
<Loading />
</div>
diff --git a/web/app/components/app-sidebar/__tests__/app-detail-section.spec.tsx b/web/app/components/app-sidebar/__tests__/app-detail-section.spec.tsx
index 0ff08042648..e84d925dbdc 100644
--- a/web/app/components/app-sidebar/__tests__/app-detail-section.spec.tsx
+++ b/web/app/components/app-sidebar/__tests__/app-detail-section.spec.tsx
@@ -186,10 +186,7 @@ describe('AppDetailSection', () => {
).not.toBeInTheDocument()
})
- it('should render access point navigation when access point permission is granted', () => {
- // Arrange
- mockAppPermissionKeys = [AppACLPermission.AccessPoint]
-
+ it('should render access point navigation using its app route', () => {
// Act
render(<AppDetailSection />)
@@ -203,19 +200,6 @@ describe('AppDetailSection', () => {
).not.toBeInTheDocument()
})
- it('should hide access point navigation when access point permission is missing', () => {
- // Arrange
- mockAppPermissionKeys = [AppACLPermission.Monitor]
-
- // Act
- render(<AppDetailSection />)
-
- // Assert
- expect(
- screen.queryByRole('link', { name: 'common.appMenus.accessPoint' }),
- ).not.toBeInTheDocument()
- })
-
it('should render deploy navigation with app deploy ACL regardless of the legacy workspace role', () => {
// Arrange
mockAppMode = 'workflow'
diff --git a/web/app/components/app-sidebar/app-detail-section.tsx b/web/app/components/app-sidebar/app-detail-section.tsx
index 677ac50aea4..3176e2cac21 100644
--- a/web/app/components/app-sidebar/app-detail-section.tsx
+++ b/web/app/components/app-sidebar/app-detail-section.tsx
@@ -120,16 +120,12 @@ const AppDetailSection = ({ expand = true }: AppDetailSectionProps) => {
},
]
: []),
- ...(appACLCapabilities.canAccessPoint
- ? [
- {
- name: t(($) => $['appMenus.accessPoint'], { ns: 'common' }),
- href: `/app/${appId}/access-point`,
- icon: accessPointNavIcon,
- selectedIcon: accessPointNavIcon,
- },
- ]
- : []),
+ {
+ name: t(($) => $['appMenus.accessPoint'], { ns: 'common' }),
+ href: `/app/${appId}/access-point`,
+ icon: accessPointNavIcon,
+ selectedIcon: accessPointNavIcon,
+ },
...(supportsAppDeploy && appACLCapabilities.canDeploy
? [
{
diff --git a/web/app/components/app/app-publisher/__tests__/environment-deployment-flow.spec.tsx b/web/app/components/app/app-publisher/__tests__/environment-deployment-flow.spec.tsx
index 9c80ad25f11..8aa12ed5457 100644
--- a/web/app/components/app/app-publisher/__tests__/environment-deployment-flow.spec.tsx
+++ b/web/app/components/app/app-publisher/__tests__/environment-deployment-flow.spec.tsx
@@ -295,7 +295,6 @@ function renderFlow(
return render(
<PublisherEnvironmentFlow
appId="app-1"
- canAccessPoint
deployment={deployment}
environmentId={deployment.environment.id}
environmentName={deployment.environment.display_name}
@@ -335,7 +334,6 @@ function renderFlowWithPolling(deployment = createDeployment()) {
<PublisherPollingObserver />
<PublisherEnvironmentFlow
appId="app-1"
- canAccessPoint
deployment={deployment}
environmentId={deployment.environment.id}
environmentName={deployment.environment.display_name}
diff --git a/web/app/components/app/app-publisher/__tests__/sections.spec.tsx b/web/app/components/app/app-publisher/__tests__/sections.spec.tsx
index 11c0b1daf3f..9090a86bbd4 100644
--- a/web/app/components/app/app-publisher/__tests__/sections.spec.tsx
+++ b/web/app/components/app/app-publisher/__tests__/sections.spec.tsx
@@ -6,7 +6,6 @@ import { renderWithConsoleQuery as render } from '@/test/console/query-data'
import { AppModeEnum } from '@/types/app'
import { PublisherActionsSection } from '../built-in-publisher/actions-section'
import { PublisherSummarySection } from '../built-in-publisher/summary-section'
-import { PublisherEnvironmentActionsSection } from '../environment-deployment-flow/actions-section'
vi.mock('../publish-with-multiple-model', () => ({
default: ({
@@ -315,7 +314,6 @@ describe('app-publisher sections', () => {
description: 'Workflow description',
}}
appURL="https://example.com/app"
- canAccessPoint
disabledFunctionButton={false}
disabledFunctionTooltip="disabled"
handleOpenRunConfig={handleOpenRunConfig}
@@ -496,7 +494,6 @@ describe('app-publisher sections', () => {
mode: AppModeEnum.WORKFLOW,
}}
appURL="https://example.com/app"
- canAccessPoint
disabledFunctionButton={false}
hasHumanInputNode={false}
hasTriggerNode
@@ -520,49 +517,11 @@ describe('app-publisher sections', () => {
)
})
- it('should hide the built-in Access Point action without permission', () => {
- render(
- <PublisherActionsSection
- appDetail={{ id: 'workflow-app', mode: AppModeEnum.WORKFLOW }}
- appURL="https://example.com/app"
- canAccessPoint={false}
- disabledFunctionButton={false}
- hasHumanInputNode={false}
- hasTriggerNode
- publishedAt={Date.now()}
- showDeployAction
- workflowToolAvailable
- workflowToolIsLoading={false}
- onConfigureWorkflowTool={vi.fn()}
- />,
- )
-
- expect(screen.queryByText(/(?:^|\.)appMenus\.accessPoint(?=$|:)/)).not.toBeInTheDocument()
- expect(screen.getByRole('link', { name: /appMenus\.deploy\b/ })).toHaveAttribute(
- 'href',
- '/app/workflow-app/deploy',
- )
- })
-
- it('should hide the environment Access Point action without permission', () => {
- render(
- <PublisherEnvironmentActionsSection
- appId="workflow-app"
- canAccessPoint={false}
- environmentId="staging"
- />,
- )
-
- expect(screen.queryByText(/(?:^|\.)appMenus\.accessPoint(?=$|:)/)).not.toBeInTheDocument()
- expect(screen.getByText(/(?:^|\.)appMenus\.deploy(?=$|:)/)).toBeInTheDocument()
- })
-
it('should expose unavailable quick links as disabled buttons before the first publish', () => {
render(
<PublisherActionsSection
appDetail={{ id: 'workflow-app', mode: AppModeEnum.WORKFLOW }}
appURL="https://example.com/app"
- canAccessPoint
disabledFunctionButton
hasHumanInputNode={false}
hasTriggerNode={false}
diff --git a/web/app/components/app/app-publisher/built-in-publisher/actions-section.tsx b/web/app/components/app/app-publisher/built-in-publisher/actions-section.tsx
index f3d120d6314..c1fe6a27869 100644
--- a/web/app/components/app/app-publisher/built-in-publisher/actions-section.tsx
+++ b/web/app/components/app/app-publisher/built-in-publisher/actions-section.tsx
@@ -23,7 +23,6 @@ type PublisherActionsSectionProps = Pick<
| null
| undefined
appURL: string
- canAccessPoint?: boolean
disabledFunctionButton: boolean
disabledFunctionTooltip?: string
handleOpenRunConfig?: (url: string) => void
@@ -42,7 +41,6 @@ type PublisherActionsSectionProps = Pick<
export function PublisherActionsSection({
appDetail,
appURL,
- canAccessPoint = false,
disabledFunctionButton,
disabledFunctionTooltip,
handleOpenRunConfig,
@@ -116,16 +114,14 @@ export function PublisherActionsSection({
<TooltipContent role="tooltip">{disabledFunctionTooltip}</TooltipContent>
</Tooltip>
)}
- {canAccessPoint && (
- <SuggestedAction
- disabled={navigationDisabled}
- description={t(($) => $['common.accessPointDescription'], { ns: 'workflow' })}
- link={appId ? `/app/${appId}/access-point` : undefined}
- icon={<span className="i-custom-vender-agent-v2-access-point size-4" />}
- >
- {t(($) => $['appMenus.accessPoint'], { ns: 'common' })}
- </SuggestedAction>
- )}
+ <SuggestedAction
+ disabled={navigationDisabled}
+ description={t(($) => $['common.accessPointDescription'], { ns: 'workflow' })}
+ link={appId ? `/app/${appId}/access-point` : undefined}
+ icon={<span className="i-custom-vender-agent-v2-access-point size-4" />}
+ >
+ {t(($) => $['appMenus.accessPoint'], { ns: 'common' })}
+ </SuggestedAction>
{showDeploy && (
<SuggestedAction
disabled={navigationDisabled}
diff --git a/web/app/components/app/app-publisher/environment-deployment-flow/actions-section.tsx b/web/app/components/app/app-publisher/environment-deployment-flow/actions-section.tsx
index 69ef07826e0..34dd368a134 100644
--- a/web/app/components/app/app-publisher/environment-deployment-flow/actions-section.tsx
+++ b/web/app/components/app/app-publisher/environment-deployment-flow/actions-section.tsx
@@ -8,12 +8,10 @@ function environmentHref(path: string, appId: string, environmentId: string) {
export function PublisherEnvironmentActionsSection({
appId,
- canAccessPoint = false,
deployment,
environmentId,
}: {
appId?: string
- canAccessPoint?: boolean
deployment?: EnvironmentDeployment
environmentId: string
}) {
@@ -24,16 +22,14 @@ export function PublisherEnvironmentActionsSection({
return (
<div className="flex flex-col border-t-[0.5px] border-t-divider-regular p-3">
- {canAccessPoint && (
- <SuggestedAction
- disabled={actionsDisabled}
- description={t(($) => $['common.accessPointDescription'], { ns: 'workflow' })}
- link={accessPointHref}
- icon={<span className="i-custom-vender-agent-v2-access-point size-4" />}
- >
- {t(($) => $['appMenus.accessPoint'], { ns: 'common' })}
- </SuggestedAction>
- )}
+ <SuggestedAction
+ disabled={actionsDisabled}
+ description={t(($) => $['common.accessPointDescription'], { ns: 'workflow' })}
+ link={accessPointHref}
+ icon={<span className="i-custom-vender-agent-v2-access-point size-4" />}
+ >
+ {t(($) => $['appMenus.accessPoint'], { ns: 'common' })}
+ </SuggestedAction>
<SuggestedAction
disabled={actionsDisabled}
description={t(($) => $['common.deployDescription'], { ns: 'workflow' })}
diff --git a/web/app/components/app/app-publisher/environment-deployment-flow/index.tsx b/web/app/components/app/app-publisher/environment-deployment-flow/index.tsx
index 9f0b1201993..dce08832bc0 100644
--- a/web/app/components/app/app-publisher/environment-deployment-flow/index.tsx
+++ b/web/app/components/app/app-publisher/environment-deployment-flow/index.tsx
@@ -15,7 +15,6 @@ import { PublisherEnvironmentSummarySection } from './summary-section'
type PublisherEnvironmentFlowProps = {
appId?: string
- canAccessPoint?: boolean
deployment?: EnvironmentDeployment
environmentId: string
environmentName: string
@@ -29,7 +28,6 @@ type PublisherEnvironmentFlowProps = {
export function PublisherEnvironmentFlow({
appId,
- canAccessPoint = false,
deployment,
environmentId,
environmentName,
@@ -93,7 +91,6 @@ export function PublisherEnvironmentFlow({
/>
<PublisherEnvironmentActionsSection
appId={appId}
- canAccessPoint={canAccessPoint}
deployment={deployment}
environmentId={environmentId}
/>
diff --git a/web/app/components/app/app-publisher/index.tsx b/web/app/components/app/app-publisher/index.tsx
index 38e9b724d1e..48278b77cfc 100644
--- a/web/app/components/app/app-publisher/index.tsx
+++ b/web/app/components/app/app-publisher/index.tsx
@@ -17,13 +17,12 @@ export function AppPublisher(props: AppPublisherProps) {
select: (data) => data.profile.id,
})
const workspacePermissionKeys = useAtomValue(workspacePermissionKeysAtom)
- const appACLCapabilities = getAppACLCapabilities(appDetail?.permission_keys, {
+ const canDeploy = getAppACLCapabilities(appDetail?.permission_keys, {
currentUserId,
resourceMaintainer: appDetail?.maintainer,
workspacePermissionKeys,
- })
- const supportsMultiEnvironment =
- appDetail?.mode === AppModeEnum.WORKFLOW && appACLCapabilities.canDeploy
+ }).canDeploy
+ const supportsMultiEnvironment = appDetail?.mode === AppModeEnum.WORKFLOW && canDeploy
return (
<AppPublisherStateBoundary
@@ -32,7 +31,6 @@ export function AppPublisher(props: AppPublisherProps) {
>
<PublisherContent
{...props}
- canAccessPoint={appACLCapabilities.canAccessPoint}
open={open}
supportsMultiEnvironment={supportsMultiEnvironment}
onOpenStateChange={setOpen}
diff --git a/web/app/components/app/app-publisher/publisher-content/index.tsx b/web/app/components/app/app-publisher/publisher-content/index.tsx
index ab07c5154ca..945e879331b 100644
--- a/web/app/components/app/app-publisher/publisher-content/index.tsx
+++ b/web/app/components/app/app-publisher/publisher-content/index.tsx
@@ -33,14 +33,12 @@ import { useWorkflowLaunch } from './use-workflow-launch'
import { useWorkflowTool } from './use-workflow-tool'
type PublisherContentProps = AppPublisherProps & {
- canAccessPoint: boolean
open: boolean
supportsMultiEnvironment: boolean
onOpenStateChange: (open: boolean) => void
}
export function PublisherContent({
- canAccessPoint,
crossAxisOffset = 0,
debugWithMultipleModel = false,
disabled = false,
@@ -214,7 +212,6 @@ export function PublisherContent({
actions: {
appDetail,
appURL,
- canAccessPoint,
disabledFunctionButton,
disabledFunctionTooltip,
handleOpenRunConfig: workflowLaunch.openDialog,
@@ -239,7 +236,6 @@ export function PublisherContent({
disabled={disabled}
environmentPublisher={{
appId: appDetail?.id,
- canAccessPoint,
deployment: selectedEnvironmentDeployment,
environmentId: selectedEnvironmentId,
environmentName:
diff --git a/web/app/components/app/deploy/__tests__/index.spec.tsx b/web/app/components/app/deploy/__tests__/index.spec.tsx
index 79c1f082294..11888a09817 100644
--- a/web/app/components/app/deploy/__tests__/index.spec.tsx
+++ b/web/app/components/app/deploy/__tests__/index.spec.tsx
@@ -650,7 +650,7 @@ function render(
return renderWithConsoleQuery(ui, { queryClient })
}
-let appPermissionKeys: string[] = [AppACLPermission.AccessPoint, AppACLPermission.Deploy]
+let appPermissionKeys: string[] = [AppACLPermission.Deploy]
let appDetailAvailable = true
const mockConsoleState = vi.hoisted(() => ({
workspacePermissionKeys: [] as string[],
@@ -744,7 +744,7 @@ vi.mock('@langgenius/dify-ui/toast', () => ({
describe('AppDeploy', () => {
beforeEach(() => {
vi.clearAllMocks()
- appPermissionKeys = [AppACLPermission.AccessPoint, AppACLPermission.Deploy]
+ appPermissionKeys = [AppACLPermission.Deploy]
appDetailAvailable = true
mockBuiltInEnvironment.appDetail.enable_api = false
mockBuiltInEnvironment.appDetail.enable_site = true
@@ -815,18 +815,6 @@ describe('AppDeploy', () => {
).toHaveAttribute('href', '/app/app-1/access-point?environment=canary&accessPoint=serviceApi')
})
- it('keeps active access points non-navigable without access point permission', () => {
- appPermissionKeys = [AppACLPermission.Deploy]
-
- render(<AppDeploy />)
-
- const canaryRow = within(screen.getByRole('row', { name: /Canary/ }))
- const webAppLabel =
- 'agentV2.agentDetail.access.webApp.title · agentV2.agentDetail.access.status.inService'
- expect(canaryRow.queryByRole('link', { name: webAppLabel })).not.toBeInTheDocument()
- expect(canaryRow.getByRole('button', { name: webAppLabel })).toBeDisabled()
- })
-
it('renders the built-in version, access points, and publisher from live app data', () => {
render(<AppDeploy />)
diff --git a/web/app/components/app/deploy/built-in-environment-card/index.tsx b/web/app/components/app/deploy/built-in-environment-card/index.tsx
index 607250e7ce6..d04dce259a8 100644
--- a/web/app/components/app/deploy/built-in-environment-card/index.tsx
+++ b/web/app/components/app/deploy/built-in-environment-card/index.tsx
@@ -19,7 +19,7 @@ function Divider() {
return <div className="i-custom-vender-deploy-line-5 h-10 w-3" />
}
-export function BuiltInEnvironmentCard({ canAccessPoint = false }: { canAccessPoint?: boolean }) {
+export function BuiltInEnvironmentCard() {
const { t } = useTranslation('deployments')
const { formatTime } = useTimestamp()
const appDetail = useAppStore((state) => state.appDetail)
@@ -90,9 +90,7 @@ export function BuiltInEnvironmentCard({ canAccessPoint = false }: { canAccessPo
key={accessPoint}
accessPoint={accessPoint}
active={activeAccessPoints[accessPoint]}
- href={
- canAccessPoint ? getAccessPointHref(appId, 'built-in', accessPoint) : undefined
- }
+ href={getAccessPointHref(appId, 'built-in', accessPoint)}
/>
))}
</div>
diff --git a/web/app/components/app/deploy/environment-table/index.tsx b/web/app/components/app/deploy/environment-table/index.tsx
index cc9b9451e59..cbee27225ed 100644
--- a/web/app/components/app/deploy/environment-table/index.tsx
+++ b/web/app/components/app/deploy/environment-table/index.tsx
@@ -23,7 +23,6 @@ import { EnvironmentRow } from './row'
type EnvironmentTableProps = {
appId: string
- canAccessPoint?: boolean
onChangeVersion?: (deployment: EnvironmentDeployment) => void
onDeployLatest?: (deployment: EnvironmentDeployment) => void
onDeployToEnvironment?: (environment: AppEnvironment) => void
@@ -33,7 +32,6 @@ type EnvironmentTableProps = {
export function EnvironmentTable({
appId,
- canAccessPoint = false,
onChangeVersion,
onDeployLatest,
onDeployToEnvironment,
@@ -134,7 +132,6 @@ export function EnvironmentTable({
<EnvironmentRow
key={row.environment.id}
appId={appId}
- canAccessPoint={canAccessPoint}
row={row}
onChangeVersion={onChangeVersion}
onDeployLatest={onDeployLatest}
diff --git a/web/app/components/app/deploy/environment-table/row.tsx b/web/app/components/app/deploy/environment-table/row.tsx
index c28b2e75f90..9e652008b67 100644
--- a/web/app/components/app/deploy/environment-table/row.tsx
+++ b/web/app/components/app/deploy/environment-table/row.tsx
@@ -10,7 +10,6 @@ import { EnvironmentRowActions } from './row-actions'
export function EnvironmentRow({
appId,
- canAccessPoint = false,
row,
onChangeVersion,
onDeployLatest,
@@ -18,7 +17,6 @@ export function EnvironmentRow({
onUndeploy,
}: {
appId: string
- canAccessPoint?: boolean
row: EnvironmentDeployment
onChangeVersion?: (deployment: EnvironmentDeployment) => void
onDeployLatest?: (deployment: EnvironmentDeployment) => void
@@ -62,11 +60,7 @@ export function EnvironmentRow({
key={accessPoint}
accessPoint={accessPoint}
active={isAccessPointActive(accessPoint)}
- href={
- canAccessPoint
- ? getAccessPointHref(appId, row.environment.id, accessPoint)
- : undefined
- }
+ href={getAccessPointHref(appId, row.environment.id, accessPoint)}
/>
))}
</div>
diff --git a/web/app/components/app/deploy/index.tsx b/web/app/components/app/deploy/index.tsx
index 4f1bee0ed1e..c22034584dd 100644
--- a/web/app/components/app/deploy/index.tsx
+++ b/web/app/components/app/deploy/index.tsx
@@ -22,7 +22,7 @@ import { useRefreshAppEnvironmentsAfterDeploymentPolling } from './use-refresh-a
import { useUndeployWorkflow } from './use-undeploy-workflow'
import { toDeploymentVersion } from './version'
-function AppDeployContent({ appId, canAccessPoint }: { appId: string; canAccessPoint: boolean }) {
+function AppDeployContent({ appId }: { appId: string }) {
const { t } = useTranslation('deployments')
const { t: tCommon } = useTranslation('common')
const { t: tWorkflow } = useTranslation('workflow')
@@ -86,10 +86,9 @@ function AppDeployContent({ appId, canAccessPoint }: { appId: string; canAccessP
</header>
<div className="flex min-h-0 grow flex-col gap-4 px-6 py-2">
- <BuiltInEnvironmentCard canAccessPoint={canAccessPoint} />
+ <BuiltInEnvironmentCard />
<EnvironmentTable
appId={appId}
- canAccessPoint={canAccessPoint}
onDeployToEnvironment={(environment) =>
setDeploymentRequest({
environment: environment.display_name,
@@ -140,17 +139,17 @@ export default function AppDeploy() {
if (!appDetail) return <Loading type="app" />
- const appACLCapabilities = getAppACLCapabilities(appDetail.permission_keys, {
+ const canDeploy = getAppACLCapabilities(appDetail.permission_keys, {
currentUserId,
resourceMaintainer: appDetail.maintainer,
workspacePermissionKeys,
- })
+ }).canDeploy
- if (appDetail.mode !== AppModeEnum.WORKFLOW || !appACLCapabilities.canDeploy) return null
+ if (appDetail.mode !== AppModeEnum.WORKFLOW || !canDeploy) return null
return (
<AppDeployStateBoundary appId={appDetail.id}>
- <AppDeployContent appId={appDetail.id} canAccessPoint={appACLCapabilities.canAccessPoint} />
+ <AppDeployContent appId={appDetail.id} />
</AppDeployStateBoundary>
)
}
diff --git a/web/app/components/app/deploy/shared/__tests__/access-point-icon.spec.tsx b/web/app/components/app/deploy/shared/__tests__/access-point-icon.spec.tsx
deleted file mode 100644
index 80d18eaaee6..00000000000
--- a/web/app/components/app/deploy/shared/__tests__/access-point-icon.spec.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import { screen } from '@testing-library/react'
-import { renderWithConsoleQuery as render } from '@/test/console/query-data'
-import { AccessPointIcon } from '../access-point-icon'
-
-describe('AccessPointIcon', () => {
- it('links active access points when navigation is allowed', () => {
- render(
- <AccessPointIcon
- accessPoint="webApp"
- active
- href="/app/app-1/access-point?environment=built-in&accessPoint=webApp"
- />,
- )
-
- expect(screen.getByRole('link')).toHaveAttribute(
- 'href',
- '/app/app-1/access-point?environment=built-in&accessPoint=webApp',
- )
- })
-
- it('keeps active access points visually active when navigation is not allowed', () => {
- render(<AccessPointIcon accessPoint="webApp" active />)
-
- expect(screen.queryByRole('link')).not.toBeInTheDocument()
- expect(screen.getByRole('button')).toBeDisabled()
- expect(screen.getByRole('button')).not.toHaveClass('opacity-30')
- })
-
- it('dims inactive access points', () => {
- render(<AccessPointIcon accessPoint="webApp" active={false} />)
-
- expect(screen.getByRole('button')).toBeDisabled()
- expect(screen.getByRole('button')).toHaveClass('opacity-30')
- })
-})
diff --git a/web/app/components/app/deploy/shared/access-point-icon.tsx b/web/app/components/app/deploy/shared/access-point-icon.tsx
index 253429f03fc..734e9b694ee 100644
--- a/web/app/components/app/deploy/shared/access-point-icon.tsx
+++ b/web/app/components/app/deploy/shared/access-point-icon.tsx
@@ -32,7 +32,7 @@ export function AccessPointIcon({
}: {
active: boolean
accessPoint: AccessPoint
- href?: string
+ href: string
}) {
const { t } = useTranslation('agentV2')
const labels = useAccessPointLabels()
@@ -40,11 +40,9 @@ export function AccessPointIcon({
? t(($) => $['agentDetail.access.status.inService'])
: t(($) => $['agentDetail.access.status.outOfService'])
const label = `${labels[accessPoint]} · ${status}`
- const canNavigate = active && Boolean(href)
const triggerClassName = cn(
'flex size-5 shrink-0 items-center justify-center rounded-md border border-divider-regular text-text-secondary shadow-xs outline-hidden focus-visible:ring-2 focus-visible:ring-state-accent-solid',
- active && (canNavigate ? 'cursor-pointer hover:bg-state-base-hover' : 'cursor-default'),
- !active && 'cursor-not-allowed opacity-30',
+ active ? 'cursor-pointer hover:bg-state-base-hover' : 'cursor-not-allowed opacity-30',
)
const icon = (
<span aria-hidden className={cn(ACCESS_POINT_ICON_CLASS_NAMES[accessPoint], 'size-3')} />
@@ -54,7 +52,7 @@ export function AccessPointIcon({
<Tooltip>
<TooltipTrigger
render={
- active && href ? (
+ active ? (
<Link href={href} aria-label={label} className={triggerClassName}>
{icon}
</Link>
diff --git a/web/app/components/header/account-setting/access-rules-page/permission-set-modal/__tests__/index.spec.tsx b/web/app/components/header/account-setting/access-rules-page/permission-set-modal/__tests__/index.spec.tsx
index 764b51cb52c..7c4b00da20e 100644
--- a/web/app/components/header/account-setting/access-rules-page/permission-set-modal/__tests__/index.spec.tsx
+++ b/web/app/components/header/account-setting/access-rules-page/permission-set-modal/__tests__/index.spec.tsx
@@ -19,7 +19,6 @@ const expectedAppACLPermissionKeys = [
'app.acl.tracing_config',
'app.acl.log_and_annotation',
'app.acl.access_config',
- 'app.acl.access_point_manage',
]
const getPermissionKeyMatcher = (permissionKey: string) =>
diff --git a/web/features/home/continue-work/__tests__/item.spec.tsx b/web/features/home/continue-work/__tests__/item.spec.tsx
index 37b74a4b944..ee61d10d6ce 100644
--- a/web/features/home/continue-work/__tests__/item.spec.tsx
+++ b/web/features/home/continue-work/__tests__/item.spec.tsx
@@ -168,15 +168,10 @@ describe('ContinueWorkItem', () => {
)
})
- it('should fall back to access point when RBAC is disabled for an access-config app with access point permission', () => {
- renderItem(
- createApp({
- permission_keys: [AppACLPermission.AccessConfig, AppACLPermission.AccessPoint],
- }),
- {
- rbac_enabled: false,
- },
- )
+ it('should fall back to access point when RBAC is disabled for an access-config-only app', () => {
+ renderItem(createApp({ permission_keys: [AppACLPermission.AccessConfig] }), {
+ rbac_enabled: false,
+ })
expect(screen.getByRole('link', { name: /Continue App/ })).toHaveAttribute(
'href',
diff --git a/web/i18n/ar-TN/permission-keys.json b/web/i18n/ar-TN/permission-keys.json
index 18321e3b376..a7f129455c5 100644
--- a/web/i18n/ar-TN/permission-keys.json
+++ b/web/i18n/ar-TN/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "إدارة إعدادات امتداد API",
"app.access_config": "تكوين أذونات الوصول إلى التطبيق",
"app.acl.access_config": "عرض أذونات الوصول وإدارتها",
- "app.acl.access_point_manage": "عرض نقاط الوصول وإدارتها",
"app.acl.delete": "حذف التطبيق",
"app.acl.deploy": "نشر التطبيق",
"app.acl.edit": "تعديل معلومات التطبيق وتنسيقه",
diff --git a/web/i18n/de-DE/permission-keys.json b/web/i18n/de-DE/permission-keys.json
index 2d546c0e082..fb32d92c699 100644
--- a/web/i18n/de-DE/permission-keys.json
+++ b/web/i18n/de-DE/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "API-Erweiterungskonfiguration verwalten",
"app.access_config": "App-Zugriffsberechtigungen konfigurieren",
"app.acl.access_config": "Zugriffsberechtigungen anzeigen und verwalten",
- "app.acl.access_point_manage": "Zugangspunkte anzeigen und verwalten",
"app.acl.delete": "App löschen",
"app.acl.deploy": "App bereitstellen",
"app.acl.edit": "App-Informationen bearbeiten und App orchestrieren",
diff --git a/web/i18n/en-US/permission-keys.json b/web/i18n/en-US/permission-keys.json
index e69f68bb0b3..2344caa11e1 100644
--- a/web/i18n/en-US/permission-keys.json
+++ b/web/i18n/en-US/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Manage API extension configuration",
"app.access_config": "Configure app access permissions",
"app.acl.access_config": "View and manage access permissions",
- "app.acl.access_point_manage": "View and manage access points",
"app.acl.delete": "Delete app",
"app.acl.deploy": "Deploy app",
"app.acl.edit": "Edit app information and orchestrate app",
diff --git a/web/i18n/es-ES/permission-keys.json b/web/i18n/es-ES/permission-keys.json
index d7d5e9d57c8..af3336ceea7 100644
--- a/web/i18n/es-ES/permission-keys.json
+++ b/web/i18n/es-ES/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Gestionar la configuración de la extensión de API",
"app.access_config": "Configurar los permisos de acceso de la app",
"app.acl.access_config": "Ver y gestionar los permisos de acceso",
- "app.acl.access_point_manage": "Ver y gestionar los puntos de acceso",
"app.acl.delete": "Eliminar app",
"app.acl.deploy": "Desplegar la app",
"app.acl.edit": "Editar la información y orquestar la app",
diff --git a/web/i18n/fa-IR/permission-keys.json b/web/i18n/fa-IR/permission-keys.json
index 5e739bed336..372374ed3b8 100644
--- a/web/i18n/fa-IR/permission-keys.json
+++ b/web/i18n/fa-IR/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "مدیریت پیکربندی افزونه API",
"app.access_config": "پیکربندی مجوزهای دسترسی برنامه",
"app.acl.access_config": "مشاهده و مدیریت مجوزهای دسترسی",
- "app.acl.access_point_manage": "مشاهده و مدیریت نقاط دسترسی",
"app.acl.delete": "حذف برنامه",
"app.acl.deploy": "استقرار برنامه",
"app.acl.edit": "ویرایش اطلاعات برنامه و هماهنگ‌سازی برنامه",
diff --git a/web/i18n/fr-FR/permission-keys.json b/web/i18n/fr-FR/permission-keys.json
index c547052586d..074da133fae 100644
--- a/web/i18n/fr-FR/permission-keys.json
+++ b/web/i18n/fr-FR/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Gérer la configuration de l'extension API",
"app.access_config": "Configurer les autorisations d'accès à l'application",
"app.acl.access_config": "Afficher et gérer les autorisations d'accès",
- "app.acl.access_point_manage": "Afficher et gérer les points d’accès",
"app.acl.delete": "Supprimer l'application",
"app.acl.deploy": "Déployer l'application",
"app.acl.edit": "Modifier les informations et orchestrer l'application",
diff --git a/web/i18n/hi-IN/permission-keys.json b/web/i18n/hi-IN/permission-keys.json
index 0779d870342..314cbfba84b 100644
--- a/web/i18n/hi-IN/permission-keys.json
+++ b/web/i18n/hi-IN/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "API एक्सटेंशन कॉन्फ़िगरेशन प्रबंधित करें",
"app.access_config": "ऐप एक्सेस अनुमतियाँ कॉन्फ़िगर करें",
"app.acl.access_config": "एक्सेस अनुमतियाँ देखें और प्रबंधित करें",
- "app.acl.access_point_manage": "एक्सेस पॉइंट देखें और प्रबंधित करें",
"app.acl.delete": "ऐप हटाएं",
"app.acl.deploy": "ऐप डिप्लॉय करें",
"app.acl.edit": "ऐप की जानकारी संपादित करें और ऐप को ऑर्केस्ट्रेट करें",
diff --git a/web/i18n/id-ID/permission-keys.json b/web/i18n/id-ID/permission-keys.json
index 349bff75538..4b04ea96f00 100644
--- a/web/i18n/id-ID/permission-keys.json
+++ b/web/i18n/id-ID/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Kelola konfigurasi ekstensi API",
"app.access_config": "Konfigurasikan izin akses aplikasi",
"app.acl.access_config": "Lihat dan kelola izin akses",
- "app.acl.access_point_manage": "Lihat dan kelola titik akses",
"app.acl.delete": "Hapus aplikasi",
"app.acl.deploy": "Deploy aplikasi",
"app.acl.edit": "Edit informasi aplikasi dan orkestrasikan aplikasi",
diff --git a/web/i18n/it-IT/permission-keys.json b/web/i18n/it-IT/permission-keys.json
index b5f3ebf8094..899adce084b 100644
--- a/web/i18n/it-IT/permission-keys.json
+++ b/web/i18n/it-IT/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Gestisci la configurazione delle estensioni API",
"app.access_config": "Configura i permessi di accesso all'app",
"app.acl.access_config": "Visualizza e gestisci i permessi di accesso",
- "app.acl.access_point_manage": "Visualizza e gestisci i punti di accesso",
"app.acl.delete": "Elimina app",
"app.acl.deploy": "Distribuisci app",
"app.acl.edit": "Modifica le informazioni e orchestra l'app",
diff --git a/web/i18n/ja-JP/permission-keys.json b/web/i18n/ja-JP/permission-keys.json
index 53033e2dc10..1b0c567f0e8 100644
--- a/web/i18n/ja-JP/permission-keys.json
+++ b/web/i18n/ja-JP/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "API拡張設定を管理",
"app.access_config": "アプリアクセス権限を設定",
"app.acl.access_config": "アクセス権限の表示と管理",
- "app.acl.access_point_manage": "アクセスポイントの表示と管理",
"app.acl.delete": "アプリを削除",
"app.acl.deploy": "アプリをデプロイ",
"app.acl.edit": "アプリ情報の編集とアプリのオーケストレーション",
diff --git a/web/i18n/ko-KR/permission-keys.json b/web/i18n/ko-KR/permission-keys.json
index 45517f6acb9..3a9981a602a 100644
--- a/web/i18n/ko-KR/permission-keys.json
+++ b/web/i18n/ko-KR/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "API 확장 구성 관리",
"app.access_config": "앱 접근 권한 구성",
"app.acl.access_config": "접근 권한 보기 및 관리",
- "app.acl.access_point_manage": "액세스 지점 보기 및 관리",
"app.acl.delete": "앱 삭제",
"app.acl.deploy": "앱 배포",
"app.acl.edit": "앱 정보 편집 및 앱 오케스트레이션",
diff --git a/web/i18n/lo-LA/permission-keys.json b/web/i18n/lo-LA/permission-keys.json
index e04ef1f59ec..bfba51cc7e2 100644
--- a/web/i18n/lo-LA/permission-keys.json
+++ b/web/i18n/lo-LA/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "ຈັດການການຕັ້ງຄ່າ API extension",
"app.access_config": "ຕັ້ງຄ່າສິດການເຂົ້າເຖິງແອັບ",
"app.acl.access_config": "ເບິ່ງ ແລະ ຈັດການສິດການເຂົ້າເຖິງ",
- "app.acl.access_point_manage": "ເບິ່ງ ແລະ ຈັດການຈຸດເຂົ້າເຖິງ",
"app.acl.delete": "ລຶບແອັບ",
"app.acl.deploy": "ຕິດຕັ້ງແອັບ",
"app.acl.edit": "ແກ້ໄຂຂໍ້ມູນແອັບ ແລະ ຈັດການລະບົບແອັບ",
diff --git a/web/i18n/nl-NL/permission-keys.json b/web/i18n/nl-NL/permission-keys.json
index 8266b38ae22..94fdf9d182c 100644
--- a/web/i18n/nl-NL/permission-keys.json
+++ b/web/i18n/nl-NL/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "API-extensieconfiguratie beheren",
"app.access_config": "Toegangsrechten voor app configureren",
"app.acl.access_config": "Toegangsrechten bekijken en beheren",
- "app.acl.access_point_manage": "Toegangspunten bekijken en beheren",
"app.acl.delete": "App verwijderen",
"app.acl.deploy": "App implementeren",
"app.acl.edit": "App-informatie bewerken en app orkestreren",
diff --git a/web/i18n/pl-PL/permission-keys.json b/web/i18n/pl-PL/permission-keys.json
index 392f470914e..55619735f16 100644
--- a/web/i18n/pl-PL/permission-keys.json
+++ b/web/i18n/pl-PL/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Zarządzaj konfiguracją rozszerzenia API",
"app.access_config": "Konfiguruj uprawnienia dostępu do aplikacji",
"app.acl.access_config": "Wyświetlaj uprawnienia dostępu i zarządzaj nimi",
- "app.acl.access_point_manage": "Wyświetlaj punkty dostępu i zarządzaj nimi",
"app.acl.delete": "Usuń aplikację",
"app.acl.deploy": "Wdróż aplikację",
"app.acl.edit": "Edytuj informacje o aplikacji i orkiestruj aplikację",
diff --git a/web/i18n/pt-BR/permission-keys.json b/web/i18n/pt-BR/permission-keys.json
index 36dd03d5719..32dda95b517 100644
--- a/web/i18n/pt-BR/permission-keys.json
+++ b/web/i18n/pt-BR/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Gerenciar configuração de extensão de API",
"app.access_config": "Configurar permissões de acesso ao aplicativo",
"app.acl.access_config": "Visualizar e gerenciar permissões de acesso",
- "app.acl.access_point_manage": "Visualizar e gerenciar pontos de acesso",
"app.acl.delete": "Excluir aplicativo",
"app.acl.deploy": "Implantar aplicativo",
"app.acl.edit": "Editar informações e orquestrar o aplicativo",
diff --git a/web/i18n/ro-RO/permission-keys.json b/web/i18n/ro-RO/permission-keys.json
index 73225f7cd60..2610e185492 100644
--- a/web/i18n/ro-RO/permission-keys.json
+++ b/web/i18n/ro-RO/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Gestionează configurația extensiei API",
"app.access_config": "Configurează permisiunile de acces ale aplicației",
"app.acl.access_config": "Vizualizează și gestionează permisiunile de acces",
- "app.acl.access_point_manage": "Vizualizează și gestionează punctele de acces",
"app.acl.delete": "Șterge aplicația",
"app.acl.deploy": "Implementează aplicația",
"app.acl.edit": "Editează informațiile aplicației și orchestrează aplicația",
diff --git a/web/i18n/ru-RU/permission-keys.json b/web/i18n/ru-RU/permission-keys.json
index bd986d65e95..574f0e96add 100644
--- a/web/i18n/ru-RU/permission-keys.json
+++ b/web/i18n/ru-RU/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Управление конфигурацией API-расширений",
"app.access_config": "Настройка прав доступа к приложению",
"app.acl.access_config": "Просмотр и управление правами доступа",
- "app.acl.access_point_manage": "Просмотр и управление точками доступа",
"app.acl.delete": "Удаление приложения",
"app.acl.deploy": "Развертывание приложения",
"app.acl.edit": "Редактирование информации о приложении и оркестрация приложения",
diff --git a/web/i18n/sl-SI/permission-keys.json b/web/i18n/sl-SI/permission-keys.json
index 4a49494a2c2..544c6f92a8d 100644
--- a/web/i18n/sl-SI/permission-keys.json
+++ b/web/i18n/sl-SI/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Upravljanje konfiguracije razširitve API",
"app.access_config": "Konfiguracija dovoljenj za dostop do aplikacije",
"app.acl.access_config": "Ogled in upravljanje dovoljenj za dostop",
- "app.acl.access_point_manage": "Ogled in upravljanje dostopnih točk",
"app.acl.delete": "Izbriši aplikacijo",
"app.acl.deploy": "Uvedi aplikacijo",
"app.acl.edit": "Uredi podatke o aplikaciji in orkestriraj aplikacijo",
diff --git a/web/i18n/th-TH/permission-keys.json b/web/i18n/th-TH/permission-keys.json
index 0ad4047ef26..b7b9854abf0 100644
--- a/web/i18n/th-TH/permission-keys.json
+++ b/web/i18n/th-TH/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "จัดการการกําหนดค่าส่วนขยาย API",
"app.access_config": "กําหนดค่าสิทธิ์การเข้าถึงแอป",
"app.acl.access_config": "ดูและจัดการสิทธิ์การเข้าถึง",
- "app.acl.access_point_manage": "ดูและจัดการจุดเข้าถึง",
"app.acl.delete": "ลบแอป",
"app.acl.deploy": "ปรับใช้แอป",
"app.acl.edit": "แก้ไขข้อมูลแอปและจัดวางแอป",
diff --git a/web/i18n/tr-TR/permission-keys.json b/web/i18n/tr-TR/permission-keys.json
index 781d9d00d38..36ba8ec9709 100644
--- a/web/i18n/tr-TR/permission-keys.json
+++ b/web/i18n/tr-TR/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "API uzantısı yapılandırmasını yönet",
"app.access_config": "Uygulama erişim izinlerini yapılandır",
"app.acl.access_config": "Erişim izinlerini görüntüle ve yönet",
- "app.acl.access_point_manage": "Erişim noktalarını görüntüle ve yönet",
"app.acl.delete": "Uygulamayı sil",
"app.acl.deploy": "Uygulamayı dağıt",
"app.acl.edit": "Uygulama bilgilerini düzenle ve uygulamayı orkestre et",
diff --git a/web/i18n/uk-UA/permission-keys.json b/web/i18n/uk-UA/permission-keys.json
index 8cfd28d2548..861c83a4367 100644
--- a/web/i18n/uk-UA/permission-keys.json
+++ b/web/i18n/uk-UA/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Керування конфігурацією розширення API",
"app.access_config": "Налаштування дозволів доступу до застосунку",
"app.acl.access_config": "Переглядати дозволи доступу та керувати ними",
- "app.acl.access_point_manage": "Переглядати точки доступу та керувати ними",
"app.acl.delete": "Видалити застосунок",
"app.acl.deploy": "Розгорнути застосунок",
"app.acl.edit": "Редагувати інформацію про застосунок та оркеструвати застосунок",
diff --git a/web/i18n/vi-VN/permission-keys.json b/web/i18n/vi-VN/permission-keys.json
index 2290d6362e0..1e6662a9304 100644
--- a/web/i18n/vi-VN/permission-keys.json
+++ b/web/i18n/vi-VN/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "Quản lý cấu hình phần mở rộng API",
"app.access_config": "Cấu hình quyền truy cập ứng dụng",
"app.acl.access_config": "Xem và quản lý quyền truy cập",
- "app.acl.access_point_manage": "Xem và quản lý điểm truy cập",
"app.acl.delete": "Xóa ứng dụng",
"app.acl.deploy": "Triển khai ứng dụng",
"app.acl.edit": "Chỉnh sửa thông tin và điều phối ứng dụng",
diff --git a/web/i18n/zh-Hans/permission-keys.json b/web/i18n/zh-Hans/permission-keys.json
index db8184ee533..91d9afb2cc8 100644
--- a/web/i18n/zh-Hans/permission-keys.json
+++ b/web/i18n/zh-Hans/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "管理API扩展",
"app.access_config": "配置应用访问权限",
"app.acl.access_config": "查看与管理访问权限",
- "app.acl.access_point_manage": "查看与管理访问点",
"app.acl.delete": "删除应用",
"app.acl.deploy": "部署应用",
"app.acl.edit": "编辑应用信息与编排应用",
diff --git a/web/i18n/zh-Hant/permission-keys.json b/web/i18n/zh-Hant/permission-keys.json
index 8a74b37f086..43350a59ada 100644
--- a/web/i18n/zh-Hant/permission-keys.json
+++ b/web/i18n/zh-Hant/permission-keys.json
@@ -3,7 +3,6 @@
"api_extension.manage": "管理API擴充配置",
"app.access_config": "配置應用訪問權限",
"app.acl.access_config": "檢視與管理存取權限",
- "app.acl.access_point_manage": "檢視與管理存取點",
"app.acl.delete": "刪除應用",
"app.acl.deploy": "部署應用",
"app.acl.edit": "編輯應用資訊與編排應用",
diff --git a/web/utils/app-redirection.spec.ts b/web/utils/app-redirection.spec.ts
index 521a500652d..d736ed5a428 100644
--- a/web/utils/app-redirection.spec.ts
+++ b/web/utils/app-redirection.spec.ts
@@ -14,20 +14,10 @@ describe('app-redirection', () => {
* - App mode (workflow, advanced-chat, chat, completion, agent-chat)
*/
describe('getRedirectionPath', () => {
- it('returns access point path when app access point permission is granted', () => {
- const app = {
- id: 'app-123',
- mode: AppModeEnum.CHAT,
- permission_keys: [AppACLPermission.AccessPoint],
- }
- const result = getRedirectionPath(app)
- expect(result).toBe('/app/app-123/access-point')
- })
-
- it('returns apps list path when app ACL cannot access guarded pages or access point', () => {
+ it('returns access point path when app ACL cannot access guarded pages', () => {
const app = { id: 'app-123', mode: AppModeEnum.CHAT, permission_keys: [] }
const result = getRedirectionPath(app)
- expect(result).toBe('/apps')
+ expect(result).toBe('/app/app-123/access-point')
})
it('returns workflow path for workflow mode when app ACL can access layout', () => {
@@ -102,11 +92,7 @@ describe('app-redirection', () => {
})
it('handles different app IDs', () => {
- const app1 = {
- id: 'abc-123',
- mode: AppModeEnum.CHAT,
- permission_keys: [AppACLPermission.AccessPoint],
- }
+ const app1 = { id: 'abc-123', mode: AppModeEnum.CHAT, permission_keys: [] }
const app2 = {
id: 'xyz-789',
mode: AppModeEnum.WORKFLOW,
@@ -143,7 +129,7 @@ describe('app-redirection', () => {
const app = {
id: 'app-123',
mode: AppModeEnum.CHAT,
- permission_keys: [AppACLPermission.AccessConfig, AppACLPermission.AccessPoint],
+ permission_keys: [AppACLPermission.AccessConfig],
}
expect(getRedirectionPath(app, { isRbacEnabled: false })).toBe('/app/app-123/access-point')
@@ -187,12 +173,8 @@ describe('app-redirection', () => {
/**
* Tests that the redirection function is called with the correct path
*/
- it('calls redirection function with access point path when access point permission is granted', () => {
- const app = {
- id: 'app-123',
- mode: AppModeEnum.CHAT,
- permission_keys: [AppACLPermission.AccessPoint],
- }
+ it('calls redirection function with access point path when app ACL cannot access guarded pages', () => {
+ const app = { id: 'app-123', mode: AppModeEnum.CHAT, permission_keys: [] }
const mockRedirect = vi.fn()
getRedirection(app, mockRedirect)
diff --git a/web/utils/app-redirection.ts b/web/utils/app-redirection.ts
index d73a350b3f3..4bdfce9a266 100644
--- a/web/utils/app-redirection.ts
+++ b/web/utils/app-redirection.ts
@@ -34,9 +34,7 @@ export const getRedirectionPath = (
if (app.mode === AppModeEnum.WORKFLOW && appACLCapabilities.canDeploy)
return `/app/${app.id}/deploy`
- if (appACLCapabilities.canAccessPoint) return `/app/${app.id}/access-point`
-
- return '/apps'
+ return `/app/${app.id}/access-point`
}
export const getRedirection = (
diff --git a/web/utils/permission.spec.ts b/web/utils/permission.spec.ts
index 487c9c891b1..75dff3e7afe 100644
--- a/web/utils/permission.spec.ts
+++ b/web/utils/permission.spec.ts
@@ -50,15 +50,6 @@ describe('permission', () => {
expect(releaseCapabilities.canDeploy).toBe(false)
})
- it('keeps access point permission independent from other app ACL permissions', () => {
- const accessPointCapabilities = getAppACLCapabilities([AppACLPermission.AccessPoint])
- const layoutCapabilities = getAppACLCapabilities([AppACLPermission.ViewLayout])
-
- expect(accessPointCapabilities.canAccessPoint).toBe(true)
- expect(accessPointCapabilities.canAccessLayout).toBe(false)
- expect(layoutCapabilities.canAccessPoint).toBe(false)
- })
-
it('keeps monitor, tracing config, and log/annotation permissions independent', () => {
const monitorCapabilities = getAppACLCapabilities([AppACLPermission.Monitor])
const tracingCapabilities = getAppACLCapabilities([AppACLPermission.TracingConfig])
@@ -118,7 +109,6 @@ describe('permission', () => {
})
expect(capabilities.canViewLayout).toBe(true)
- expect(capabilities.canAccessPoint).toBe(true)
expect(capabilities.canTestAndRun).toBe(true)
expect(capabilities.canEdit).toBe(true)
expect(capabilities.canImportExportDSL).toBe(true)
diff --git a/web/utils/permission.ts b/web/utils/permission.ts
index 30b0b3e0cbe..063878b6607 100644
--- a/web/utils/permission.ts
+++ b/web/utils/permission.ts
@@ -2,7 +2,6 @@ import type { PermissionKey } from '@/models/access-control'
export const AppACLPermission = {
Preview: 'app.acl.preview',
- AccessPoint: 'app.acl.access_point_manage',
ViewLayout: 'app.acl.view_layout',
TestAndRun: 'app.acl.test_and_run',
Edit: 'app.acl.edit',
@@ -39,7 +38,6 @@ export type ResourceMaintainerPermissionOptions = {
}
type AppACLCapabilities = {
- canAccessPoint: boolean
canViewLayout: boolean
canTestAndRun: boolean
canEdit: boolean
@@ -137,11 +135,6 @@ export const getAppACLCapabilities = (
)
return {
- canAccessPoint: hasResourcePermission(
- permissionKeys,
- AppACLPermission.AccessPoint,
- hasMaintainerPermissions,
- ),
canViewLayout,
canTestAndRun,
canEdit,