improvements: final feedback

This commit is contained in:
Scott Wilson
2025-03-12 11:28:38 -07:00
parent 667580546b
commit 0cc3240956
8 changed files with 15 additions and 8 deletions
@@ -24,7 +24,7 @@ interface AccessTreeProviderProps {
}
export const AccessTreeProvider: React.FC<AccessTreeProviderProps> = ({ children }) => {
const [secretName, setSecretName] = useState("*");
const [secretName, setSecretName] = useState("");
const [viewMode, setViewMode] = useState(ViewMode.Docked);
const value = useMemo(
@@ -126,7 +126,11 @@ export const PermissionSimulation = ({
{subject === ProjectPermissionSub.Secrets && (
<div>
<FormLabel label="Secret Name" />
<Input value={secretName} onChange={(e) => setSecretName(e.target.value)} />
<Input
placeholder="*"
value={secretName}
onChange={(e) => setSecretName(e.target.value)}
/>
</div>
)}
</>
@@ -103,7 +103,7 @@ export const createFolderNode = ({
if (hasPermission) {
// we want to show yellow/conditional access if user hasn't specified secret name to fully resolve access
if (
(!secretName || secretName === "*") &&
!secretName &&
actionRuleMap.some((el) => {
// 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)