fix: org managers not able to access api keys (#7123)

This commit is contained in:
Dhruwang Jariwala
2026-01-16 15:24:54 +05:30
committed by GitHub
parent 957a4432f4
commit 6e19de32f7

View File

@@ -18,9 +18,9 @@ export const APIKeysPage = async (props) => {
const projects = await getProjectsByOrganizationId(organization.id);
const isNotOwner = currentUserMembership.role !== "owner";
const canAccessApiKeys = currentUserMembership.role === "owner" || currentUserMembership.role === "manager";
if (isNotOwner) throw new Error(t("common.not_authorized"));
if (!canAccessApiKeys) throw new Error(t("common.not_authorized"));
return (
<PageContentWrapper>
@@ -38,7 +38,7 @@ export const APIKeysPage = async (props) => {
<ApiKeyList
organizationId={organization.id}
locale={locale}
isReadOnly={isNotOwner}
isReadOnly={!canAccessApiKeys}
projects={projects}
/>
</SettingsCard>