misc: addressed feedback

This commit is contained in:
Sheen Capadngan
2025-04-17 04:00:02 +08:00
parent fc2e5d18b7
commit 1137247e69
14 changed files with 29 additions and 29 deletions
@@ -111,7 +111,7 @@ export const useUpdateOrg = () => {
enforceMfa,
selectedMfaMethod,
allowSecretSharingOutsideOrganization,
enableBypassOrgAuth
bypassOrgAuthEnabled
}) => {
return apiRequest.patch(`/api/v1/organization/${orgId}`, {
name,
@@ -122,7 +122,7 @@ export const useUpdateOrg = () => {
enforceMfa,
selectedMfaMethod,
allowSecretSharingOutsideOrganization,
enableBypassOrgAuth
bypassOrgAuthEnabled
});
},
onSuccess: () => {
+2 -2
View File
@@ -9,7 +9,7 @@ export type Organization = {
createAt: string;
updatedAt: string;
authEnforced: boolean;
enableBypassOrgAuth: boolean;
bypassOrgAuthEnabled: boolean;
orgAuthMethod: string;
scimEnabled: boolean;
slug: string;
@@ -31,7 +31,7 @@ export type UpdateOrgDTO = {
enforceMfa?: boolean;
selectedMfaMethod?: MfaMethod;
allowSecretSharingOutsideOrganization?: boolean;
enableBypassOrgAuth?: boolean;
bypassOrgAuthEnabled?: boolean;
};
export type BillingDetails = {
@@ -71,7 +71,7 @@ export const SelectOrganizationPage = () => {
const handleSelectOrganization = useCallback(
async (organization: Organization) => {
const canBypassOrgAuth =
organization.enableBypassOrgAuth &&
organization.bypassOrgAuthEnabled &&
organization.userRole === OrgMembershipRole.Admin &&
isAdminLogin;
@@ -65,7 +65,7 @@ export const OrgGeneralAuthSection = () => {
await mutateAsync({
orgId: currentOrg?.id,
enableBypassOrgAuth: value
bypassOrgAuthEnabled: value
});
createNotification({
@@ -129,7 +129,7 @@ export const OrgGeneralAuthSection = () => {
level.
</span>
<p className="mt-4">
In case of a lockout, admins can use the admin login portal in{" "}
In case of a lockout, admins can use the admin login portal at{" "}
<a
target="_blank"
rel="noopener noreferrer"
@@ -153,7 +153,7 @@ export const OrgGeneralAuthSection = () => {
{(isAllowed) => (
<Switch
id="allow-admin-bypass"
isChecked={currentOrg?.enableBypassOrgAuth ?? false}
isChecked={currentOrg?.bypassOrgAuthEnabled ?? false}
onCheckedChange={(value) => handleEnableBypassOrgAuthToggle(value)}
isDisabled={!isAllowed}
/>
@@ -92,7 +92,7 @@ export const OrgOIDCSection = (): JSX.Element => {
await updateOrg({
orgId: currentOrg?.id,
enableBypassOrgAuth: value
bypassOrgAuthEnabled: value
});
createNotification({
@@ -212,7 +212,7 @@ export const OrgOIDCSection = (): JSX.Element => {
level.
</span>
<p className="mt-4">
In case of a lockout, admins can use the admin login portal in{" "}
In case of a lockout, admins can use the admin login portal at{" "}
<a
target="_blank"
rel="noopener noreferrer"
@@ -236,7 +236,7 @@ export const OrgOIDCSection = (): JSX.Element => {
{(isAllowed) => (
<Switch
id="allow-admin-bypass"
isChecked={currentOrg?.enableBypassOrgAuth ?? false}
isChecked={currentOrg?.bypassOrgAuthEnabled ?? false}
onCheckedChange={(value) => handleEnableBypassOrgAuthToggle(value)}
isDisabled={!isAllowed}
/>