mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 15:40:47 +00:00
misc: addressed feedback
This commit is contained in:
@@ -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: () => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+3
-3
@@ -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}
|
||||
/>
|
||||
|
||||
+3
-3
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user