mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 20:28:31 +00:00
improvements: final feedback
This commit is contained in:
@@ -680,7 +680,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
|
|
||||||
server.route({
|
server.route({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: "/:workspaceId/folders/environment-folder-tree",
|
url: "/:workspaceId/environment-folder-tree",
|
||||||
config: {
|
config: {
|
||||||
rateLimit: readLimit
|
rateLimit: readLimit
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ interface AccessTreeProviderProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const AccessTreeProvider: React.FC<AccessTreeProviderProps> = ({ children }) => {
|
export const AccessTreeProvider: React.FC<AccessTreeProviderProps> = ({ children }) => {
|
||||||
const [secretName, setSecretName] = useState("*");
|
const [secretName, setSecretName] = useState("");
|
||||||
const [viewMode, setViewMode] = useState(ViewMode.Docked);
|
const [viewMode, setViewMode] = useState(ViewMode.Docked);
|
||||||
|
|
||||||
const value = useMemo(
|
const value = useMemo(
|
||||||
|
|||||||
@@ -126,7 +126,11 @@ export const PermissionSimulation = ({
|
|||||||
{subject === ProjectPermissionSub.Secrets && (
|
{subject === ProjectPermissionSub.Secrets && (
|
||||||
<div>
|
<div>
|
||||||
<FormLabel label="Secret Name" />
|
<FormLabel label="Secret Name" />
|
||||||
<Input value={secretName} onChange={(e) => setSecretName(e.target.value)} />
|
<Input
|
||||||
|
placeholder="*"
|
||||||
|
value={secretName}
|
||||||
|
onChange={(e) => setSecretName(e.target.value)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export const createFolderNode = ({
|
|||||||
if (hasPermission) {
|
if (hasPermission) {
|
||||||
// we want to show yellow/conditional access if user hasn't specified secret name to fully resolve access
|
// we want to show yellow/conditional access if user hasn't specified secret name to fully resolve access
|
||||||
if (
|
if (
|
||||||
(!secretName || secretName === "*") &&
|
!secretName &&
|
||||||
actionRuleMap.some((el) => {
|
actionRuleMap.some((el) => {
|
||||||
// we only show conditional if secretName/secretTags are present - environment and path can be directly determined
|
// we only show conditional if secretName/secretTags are present - environment and path can be directly determined
|
||||||
if (!el[action]?.conditions?.secretName && !el[action]?.conditions?.secretTags)
|
if (!el[action]?.conditions?.secretName && !el[action]?.conditions?.secretTags)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export const useListProjectEnvironmentsFolders = (
|
|||||||
queryKey: folderQueryKeys.getProjectEnvironmentsFolders(projectId),
|
queryKey: folderQueryKeys.getProjectEnvironmentsFolders(projectId),
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const { data } = await apiRequest.get<TProjectEnvironmentsFolders>(
|
const { data } = await apiRequest.get<TProjectEnvironmentsFolders>(
|
||||||
`/api/v1/workspace/${projectId}/folders/environment-folder-tree`
|
`/api/v1/workspace/${projectId}/environment-folder-tree`
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-1
@@ -46,7 +46,8 @@ export const GeneralPermissionConditions = ({ position = 0, isDisabled, type }:
|
|||||||
<div className="mt-6 border-t border-t-mineshaft-600 bg-mineshaft-800 pt-2">
|
<div className="mt-6 border-t border-t-mineshaft-600 bg-mineshaft-800 pt-2">
|
||||||
<p className="mt-2 text-gray-300">Conditions</p>
|
<p className="mt-2 text-gray-300">Conditions</p>
|
||||||
<p className="mb-2 text-sm text-mineshaft-400">
|
<p className="mb-2 text-sm text-mineshaft-400">
|
||||||
When this policy should apply (always if no conditions are added).
|
When this policy should apply (always if no conditions are added). All conditions must
|
||||||
|
evaluate to true for the policy to take effect.
|
||||||
</p>
|
</p>
|
||||||
<div className="mt-2 flex flex-col space-y-2">
|
<div className="mt-2 flex flex-col space-y-2">
|
||||||
{items.fields.map((el, index) => {
|
{items.fields.map((el, index) => {
|
||||||
|
|||||||
+2
-1
@@ -40,7 +40,8 @@ export const IdentityManagementPermissionConditions = ({ position = 0, isDisable
|
|||||||
<div className="mt-6 border-t border-t-mineshaft-600 bg-mineshaft-800 pt-2">
|
<div className="mt-6 border-t border-t-mineshaft-600 bg-mineshaft-800 pt-2">
|
||||||
<p className="mt-2 text-gray-300">Conditions</p>
|
<p className="mt-2 text-gray-300">Conditions</p>
|
||||||
<p className="mb-2 text-sm text-mineshaft-400">
|
<p className="mb-2 text-sm text-mineshaft-400">
|
||||||
When this policy should apply (always if no conditions are added).
|
When this policy should apply (always if no conditions are added). All conditions must
|
||||||
|
evaluate to true for the policy to take effect.
|
||||||
</p>
|
</p>
|
||||||
<div className="mt-2 flex flex-col space-y-2">
|
<div className="mt-2 flex flex-col space-y-2">
|
||||||
{items.fields.map((el, index) => {
|
{items.fields.map((el, index) => {
|
||||||
|
|||||||
+2
-1
@@ -44,7 +44,8 @@ export const SecretPermissionConditions = ({ position = 0, isDisabled }: Props)
|
|||||||
<div className="mt-6 border-t border-t-mineshaft-600 bg-mineshaft-800 pt-2">
|
<div className="mt-6 border-t border-t-mineshaft-600 bg-mineshaft-800 pt-2">
|
||||||
<p className="mt-2 text-gray-300">Conditions</p>
|
<p className="mt-2 text-gray-300">Conditions</p>
|
||||||
<p className="mb-2 text-sm text-mineshaft-400">
|
<p className="mb-2 text-sm text-mineshaft-400">
|
||||||
When this policy should apply (always if no conditions are added).
|
When this policy should apply (always if no conditions are added). All conditions must
|
||||||
|
evaluate to true for the policy to take effect.
|
||||||
</p>
|
</p>
|
||||||
<div className="mt-2 flex flex-col space-y-2">
|
<div className="mt-2 flex flex-col space-y-2">
|
||||||
{items.fields.map((el, index) => {
|
{items.fields.map((el, index) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user