mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 09:26:47 +00:00
improvements: address feedback
This commit is contained in:
@@ -135,6 +135,18 @@ Below is a comprehensive list of all available project-level subjects and their
|
|||||||
| `edit` | Modify token properties |
|
| `edit` | Modify token properties |
|
||||||
| `delete` | Revoke or remove service tokens |
|
| `delete` | Revoke or remove service tokens |
|
||||||
|
|
||||||
|
#### Subject: `app-connections`
|
||||||
|
|
||||||
|
Supports conditions and permission inversion
|
||||||
|
|
||||||
|
| Action | Description |
|
||||||
|
| ------------------------- | ---------------------------------- |
|
||||||
|
| `read-app-connections` | View app connection configurations |
|
||||||
|
| `create-app-connections` | Create new app connections |
|
||||||
|
| `edit-app-connections` | Modify existing app connections |
|
||||||
|
| `delete-app-connections` | Remove app connections |
|
||||||
|
| `connect-app-connections` | Use app connections |
|
||||||
|
|
||||||
### Secrets Management
|
### Secrets Management
|
||||||
|
|
||||||
#### Subject: `secrets`
|
#### Subject: `secrets`
|
||||||
|
|||||||
+1
-1
@@ -107,7 +107,7 @@ export const SecretRotationV2ConnectionField = ({ onChange: callback, isUpdate }
|
|||||||
{!isUpdate && !isPending && !availableConnections?.length && !canCreateConnection && (
|
{!isUpdate && !isPending && !availableConnections?.length && !canCreateConnection && (
|
||||||
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
|
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
|
||||||
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
|
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
|
||||||
You do not have access to any ${appName} Connections. Contact an admin to create one.
|
You do not have access to any {appName} Connections. Contact an admin to create one.
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<AddAppConnectionModal
|
<AddAppConnectionModal
|
||||||
|
|||||||
+1
-1
@@ -108,7 +108,7 @@ export const SecretScanningDataSourceConnectionField = ({
|
|||||||
{!isUpdate && !isPending && !availableConnections?.length && !canCreateConnection && (
|
{!isUpdate && !isPending && !availableConnections?.length && !canCreateConnection && (
|
||||||
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
|
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
|
||||||
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
|
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
|
||||||
You do not have access to any ${connectionName} Connections. Contact an admin to create
|
You do not have access to any {connectionName} Connections. Contact an admin to create
|
||||||
one.
|
one.
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {
|
|||||||
{!isPending && !availableConnections?.length && !canCreateConnection && (
|
{!isPending && !availableConnections?.length && !canCreateConnection && (
|
||||||
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
|
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
|
||||||
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
|
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
|
||||||
You do not have access to any ${appName} Connections. Contact an admin to create one.
|
You do not have access to any {appName} Connections. Contact an admin to create one.
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<AddAppConnectionModal
|
<AddAppConnectionModal
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import {
|
|||||||
TAppConnectionResponse,
|
TAppConnectionResponse,
|
||||||
TCreateAppConnectionDTO,
|
TCreateAppConnectionDTO,
|
||||||
TDeleteAppConnectionDTO,
|
TDeleteAppConnectionDTO,
|
||||||
TMigrateAppConnectionDTO,
|
|
||||||
TUpdateAppConnectionDTO
|
TUpdateAppConnectionDTO
|
||||||
} from "@app/hooks/api/appConnections/types";
|
} from "@app/hooks/api/appConnections/types";
|
||||||
|
|
||||||
@@ -62,21 +61,3 @@ export const useDeleteAppConnection = () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useMigrateAppConnection = () => {
|
|
||||||
const queryClient = useQueryClient();
|
|
||||||
return useMutation({
|
|
||||||
mutationFn: async ({ connectionId, app }: TMigrateAppConnectionDTO) => {
|
|
||||||
const { data } = await apiRequest.post(
|
|
||||||
`/api/v1/app-connections/${app}/${connectionId}/migrate`
|
|
||||||
);
|
|
||||||
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
onSuccess: ({ projectId, app }) => {
|
|
||||||
queryClient.invalidateQueries({ queryKey: appConnectionKeys.list(projectId) });
|
|
||||||
queryClient.invalidateQueries({ queryKey: appConnectionKeys.listAvailable(app, projectId) });
|
|
||||||
// queryClient.invalidateQueries({ queryKey: appConnectionKeys.byId(app, connectionId) });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
|
||||||
|
|
||||||
import { AppConnection } from "../enums";
|
import { AppConnection } from "../enums";
|
||||||
import { TOnePassConnection } from "./1password-connection";
|
import { TOnePassConnection } from "./1password-connection";
|
||||||
import { TAppConnectionOption } from "./app-options";
|
import { TAppConnectionOption } from "./app-options";
|
||||||
@@ -196,22 +194,18 @@ export type TDeleteAppConnectionDTO = {
|
|||||||
// [AppConnection.Okta]: TOktaConnection;
|
// [AppConnection.Okta]: TOktaConnection;
|
||||||
// };
|
// };
|
||||||
|
|
||||||
export type TMigrateAppConnectionDTO = {
|
// scott: we will need this once we have individual app connection page
|
||||||
app: AppConnection;
|
// export type AppConnectionUsage = {
|
||||||
connectionId: string;
|
// projects: Array<{
|
||||||
};
|
// id: string;
|
||||||
|
// name: string;
|
||||||
export type AppConnectionUsage = {
|
// slug: string;
|
||||||
projects: Array<{
|
// type: ProjectType;
|
||||||
id: string;
|
// resources: {
|
||||||
name: string;
|
// secretSyncs: Array<{ id: string; name: string }>;
|
||||||
slug: string;
|
// externalCas: Array<{ id: string; name: string }>;
|
||||||
type: ProjectType;
|
// secretRotations: Array<{ id: string; name: string }>;
|
||||||
resources: {
|
// dataSources: Array<{ id: string; name: string }>;
|
||||||
secretSyncs: Array<{ id: string; name: string }>;
|
// };
|
||||||
externalCas: Array<{ id: string; name: string }>;
|
// }>;
|
||||||
secretRotations: Array<{ id: string; name: string }>;
|
// };
|
||||||
dataSources: Array<{ id: string; name: string }>;
|
|
||||||
};
|
|
||||||
}>;
|
|
||||||
};
|
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ const Content = ({ onComplete, projectId, projectType, app }: ContentProps) => {
|
|||||||
return (
|
return (
|
||||||
<AppConnectionForm
|
<AppConnectionForm
|
||||||
onComplete={onComplete}
|
onComplete={onComplete}
|
||||||
onBack={() => setSelectedApp(null)}
|
onBack={app ? undefined : () => setSelectedApp(null)}
|
||||||
app={(app ?? selectedApp)!}
|
app={(app ?? selectedApp)!}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user