mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-31 12:23:33 -06:00
fix: org managers not able to access api keys (#7123)
This commit is contained in:
committed by
GitHub
parent
957a4432f4
commit
6e19de32f7
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user