change upgrade btn based on admin

This commit is contained in:
Maidul Islam
2024-07-31 10:59:36 -04:00
parent e7c1a4d4a0
commit 46ca3856b3
@@ -92,7 +92,6 @@ export const SecretV2MigrationSection = () => {
<p className="mb-4 leading-7 text-gray-400"> <p className="mb-4 leading-7 text-gray-400">
Infisical secrets engine is now 10x faster and allows you to encrypt secrets with your own Infisical secrets engine is now 10x faster and allows you to encrypt secrets with your own
KMS. Upgrade your project to receive these improvements. KMS. Upgrade your project to receive these improvements.
<b>{!isAdmin && "This is an admin only operation."}</b>
</p> </p>
<Button <Button
onClick={() => handlePopUpOpen("migrationInfo")} onClick={() => handlePopUpOpen("migrationInfo")}
@@ -100,7 +99,7 @@ export const SecretV2MigrationSection = () => {
color="mineshaft" color="mineshaft"
isLoading={migrateProjectToV3.isLoading} isLoading={migrateProjectToV3.isLoading}
> >
Upgrade Project { isAdmin ? "Upgrade Project" : "Upgrade requires admin privilege"}
</Button> </Button>
{didProjectUpgradeFailed && ( {didProjectUpgradeFailed && (
<p className="mt-2 text-sm leading-7 text-red-400"> <p className="mt-2 text-sm leading-7 text-red-400">