mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 12:04:03 +00:00
feat(infisical-pg): auth injection completed and validation in password router
This commit is contained in:
@@ -70,7 +70,7 @@ export const SecretRotationPage = withProjectPermission(
|
||||
"deleteRotation",
|
||||
"upgradePlan"
|
||||
] as const);
|
||||
const workspaceId = currentWorkspace?._id || "";
|
||||
const workspaceId = currentWorkspace?.id || "";
|
||||
const canCreateRotation = permission.can(
|
||||
ProjectPermissionActions.Create,
|
||||
ProjectPermissionSub.SecretRotation
|
||||
@@ -145,11 +145,11 @@ export const SecretRotationPage = withProjectPermission(
|
||||
const handleUserAcceptBotCondition = async () => {
|
||||
const provider = popUp.activeBot?.data as TSecretRotationProvider;
|
||||
try {
|
||||
if (bot?._id) {
|
||||
if (bot?.id) {
|
||||
const botKey = generateBotKey(bot.publicKey, userWsKey!);
|
||||
await updateBotActiveStatus({
|
||||
isActive: true,
|
||||
botId: bot._id,
|
||||
botId: bot.id,
|
||||
workspaceId,
|
||||
botKey
|
||||
});
|
||||
@@ -232,16 +232,16 @@ export const SecretRotationPage = withProjectPermission(
|
||||
secretPath,
|
||||
outputs,
|
||||
provider,
|
||||
_id,
|
||||
id,
|
||||
lastRotatedAt,
|
||||
status,
|
||||
statusMessage
|
||||
}) => {
|
||||
const isDeleting = deleteSecretRotationVars?.id === _id && isDeletingRotation;
|
||||
const isDeleting = deleteSecretRotationVars?.id === id && isDeletingRotation;
|
||||
const isRestarting =
|
||||
restartSecretRotationVar?.id === _id && isRestartingRotation;
|
||||
restartSecretRotationVar?.id === id && isRestartingRotation;
|
||||
return (
|
||||
<Tr key={_id}>
|
||||
<Tr key={id}>
|
||||
<Td>
|
||||
{outputs
|
||||
.map(({ key }) => key)
|
||||
@@ -291,7 +291,7 @@ export const SecretRotationPage = withProjectPermission(
|
||||
colorSchema="danger"
|
||||
ariaLabel="delete-rotation"
|
||||
isDisabled={isDeleting || !isAllowed}
|
||||
onClick={() => handleRestartRotation(_id)}
|
||||
onClick={() => handleRestartRotation(id)}
|
||||
>
|
||||
{isRestarting ? (
|
||||
<Spinner size="xs" />
|
||||
@@ -313,7 +313,7 @@ export const SecretRotationPage = withProjectPermission(
|
||||
colorSchema="danger"
|
||||
ariaLabel="delete-rotation"
|
||||
isDisabled={isDeleting || !isAllowed}
|
||||
onClick={() => handlePopUpOpen("deleteRotation", { id: _id })}
|
||||
onClick={() => handlePopUpOpen("deleteRotation", { id: id })}
|
||||
>
|
||||
{isDeleting ? (
|
||||
<Spinner size="xs" />
|
||||
|
||||
+5
-5
@@ -23,7 +23,7 @@ type Props = {
|
||||
export const RotationOutputForm = ({ onSubmit, onCancel, outputSchema = {} }: Props) => {
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const environments = currentWorkspace?.environments || [];
|
||||
const workspaceId = currentWorkspace?._id || "";
|
||||
const workspaceId = currentWorkspace?.id || "";
|
||||
const {
|
||||
control,
|
||||
handleSubmit,
|
||||
@@ -117,11 +117,11 @@ export const RotationOutputForm = ({ onSubmit, onCancel, outputSchema = {} }: Pr
|
||||
{!isSecretsLoading &&
|
||||
secrets
|
||||
?.filter(
|
||||
({ _id }) =>
|
||||
value === _id || !Object.values(selectedSecrets || {}).includes(_id)
|
||||
({ id }) =>
|
||||
value === id || !Object.values(selectedSecrets || {}).includes(id)
|
||||
)
|
||||
?.map(({ key, _id }) => (
|
||||
<SelectItem value={_id} key={_id}>
|
||||
?.map(({ key, id }) => (
|
||||
<SelectItem value={id} key={id}>
|
||||
{key}
|
||||
</SelectItem>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user