mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 06:26:16 +00:00
Merge pull request #3220 from akhilmhdh/fix/remove-user-removal-paywall
feat: removed user paywall for user management and fixed a type error
This commit is contained in:
@@ -2567,6 +2567,8 @@ export const secretV2BridgeServiceFactory = ({
|
|||||||
type: SecretType.Shared
|
type: SecretType.Shared
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!secret) throw new NotFoundError({ message: `Secret with name '${secretName}' not found` });
|
||||||
|
|
||||||
throwIfMissingSecretReadValueOrDescribePermission(permission, ProjectPermissionSecretActions.DescribeSecret, {
|
throwIfMissingSecretReadValueOrDescribePermission(permission, ProjectPermissionSecretActions.DescribeSecret, {
|
||||||
environment,
|
environment,
|
||||||
secretPath,
|
secretPath,
|
||||||
@@ -2574,7 +2576,7 @@ export const secretV2BridgeServiceFactory = ({
|
|||||||
secretTags: (secret?.tags || []).map((el) => el.slug)
|
secretTags: (secret?.tags || []).map((el) => el.slug)
|
||||||
});
|
});
|
||||||
|
|
||||||
const decryptedSecretValue = secret.encryptedValue
|
const decryptedSecretValue = secret?.encryptedValue
|
||||||
? secretManagerDecryptor({ cipherTextBlob: secret.encryptedValue }).toString()
|
? secretManagerDecryptor({ cipherTextBlob: secret.encryptedValue }).toString()
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
|
|||||||
@@ -282,12 +282,6 @@ export const superAdminServiceFactory = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const deleteUser = async (userId: string) => {
|
const deleteUser = async (userId: string) => {
|
||||||
if (!licenseService.onPremFeatures?.instanceUserManagement) {
|
|
||||||
throw new BadRequestError({
|
|
||||||
message: "Failed to delete user due to plan restriction. Upgrade to Infisical's Pro plan."
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const user = await userDAL.deleteById(userId);
|
const user = await userDAL.deleteById(userId);
|
||||||
return user;
|
return user;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ import {
|
|||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
import { UsePopUpState } from "@app/hooks/usePopUp";
|
import { UsePopUpState } from "@app/hooks/usePopUp";
|
||||||
|
|
||||||
const deleteUserUpgradePlanMessage = "Deleting users via Admin UI";
|
|
||||||
const addServerAdminUpgradePlanMessage = "Granting another user Server Admin permissions";
|
const addServerAdminUpgradePlanMessage = "Granting another user Server Admin permissions";
|
||||||
|
|
||||||
const UserPanelTable = ({
|
const UserPanelTable = ({
|
||||||
@@ -156,14 +155,6 @@ const UserPanelTable = ({
|
|||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (!subscription?.instanceUserManagement) {
|
|
||||||
handlePopUpOpen("upgradePlan", {
|
|
||||||
username,
|
|
||||||
id,
|
|
||||||
message: deleteUserUpgradePlanMessage
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
handlePopUpOpen("removeUser", { username, id });
|
handlePopUpOpen("removeUser", { username, id });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user