mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 01:05:40 +00:00
Add lockout-preventative step in saml config setup, add update org slug section in org settings, revise navigate to org flow to account for org-level auth enforced orgs
This commit is contained in:
@@ -12,8 +12,8 @@ import {
|
||||
PlanBillingInfo,
|
||||
PmtMethod,
|
||||
ProductsTable,
|
||||
RenameOrgDTO,
|
||||
TaxID
|
||||
TaxID,
|
||||
UpdateOrgDTO
|
||||
} from "./types";
|
||||
|
||||
export const organizationKeys = {
|
||||
@@ -65,12 +65,20 @@ export const useCreateOrg = () => {
|
||||
});
|
||||
};
|
||||
|
||||
export const useRenameOrg = () => {
|
||||
export const useUpdateOrg = () => {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return useMutation<{}, {}, RenameOrgDTO>({
|
||||
mutationFn: ({ newOrgName, orgId }) => {
|
||||
return apiRequest.patch(`/api/v1/organization/${orgId}/name`, { name: newOrgName });
|
||||
return useMutation<{}, {}, UpdateOrgDTO>({
|
||||
mutationFn: ({
|
||||
name,
|
||||
authEnforced,
|
||||
slug,
|
||||
orgId
|
||||
}) => {
|
||||
return apiRequest.patch(`/api/v1/organization/${orgId}`, {
|
||||
name,
|
||||
authEnforced,
|
||||
slug
|
||||
});
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries(organizationKeys.getUserOrganizations);
|
||||
|
||||
Reference in New Issue
Block a user