Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

fix(organizations): fit phase 3 to phase 2's organization admin check and page

Petr Bauch0c004179545e
diff --git a/core/switch_core/gateway/organizations.py b/core/switch_core/gateway/organizations.py
index 85ff261ae..937987c0b 100644
--- a/core/switch_core/gateway/organizations.py
+++ b/core/switch_core/gateway/organizations.py
@@ -426,7 +426,7 @@ async def list_organization_issues(
(`organization_issues.py`), read from how things stand rather than from
the audit log, so an issue is gone once fixed. `org_admin` only, and the
platform operator while the organization has none."""
- access = await _require_organization_admin(
+ access = await require_organization_admin(
session, user_store, organization_store, user, operator_restores=True
)
issues, admins = await organization_wide_issues(session, access.organization_id)
diff --git a/gateway/src/pages/organization/OrganizationPage.test.tsx b/gateway/src/pages/organization/OrganizationPage.test.tsx
index 0a785e400..1a9631b52 100644
--- a/gateway/src/pages/organization/OrganizationPage.test.tsx
+++ b/gateway/src/pages/organization/OrganizationPage.test.tsx
@@ -211,6 +211,7 @@ describe("OrganizationPage", () => {
"GET /organizations/current/workspaces": [workspace("t1", "Acme")],
"GET /organizations/current/members": [],
"GET /organizations/current/audit-events": [],
+ "GET /organizations/current/issues": [],
});
render(<OrganizationPage />);