From 79a9977dbc4ec4b4f6367fc8ad0fe83a3205c8c2 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 23 Jul 2025 17:39:15 +0200 Subject: [PATCH] fix: Fix policy template mapping and update credential labels in QuickStartWizard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix 'Invalid template' error by correctly mapping policy types to template keys - 'readwrite' -> 'bucketFullAccess' - 'readonly' -> 'bucketReadOnly' - 'writeonly' -> 'bucketWriteOnly' - Update user creation form labels to 'Username (Access Key)' and 'Password (Secret Key)' - Update review section to show consistent MinIO credential terminology - Add helpful text explaining these are MinIO credentials This ensures the QuickStartWizard creates policies correctly and maintains consistent credential terminology across all UI components. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../components/Dashboard/QuickStartWizard.tsx | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/Dashboard/QuickStartWizard.tsx b/frontend/src/components/Dashboard/QuickStartWizard.tsx index 23dca52..c42553d 100644 --- a/frontend/src/components/Dashboard/QuickStartWizard.tsx +++ b/frontend/src/components/Dashboard/QuickStartWizard.tsx @@ -135,8 +135,16 @@ const QuickStartWizard: React.FC = ({ // Step 3: Create policy const policyName = `${setupData.bucketName}-${setupData.policyType}-policy`; + + // Map policy types to template keys + const templateKey = setupData.policyType === 'readwrite' + ? 'bucketFullAccess' + : setupData.policyType === 'readonly' + ? 'bucketReadOnly' + : 'bucketWriteOnly'; + const policyJson = policyService.generatePolicyFromTemplate( - `bucket${setupData.policyType.charAt(0).toUpperCase() + setupData.policyType.slice(1).replace('only', 'Only')}`, + templateKey, setupData.bucketName ); @@ -220,21 +228,22 @@ const QuickStartWizard: React.FC = ({ setSetupData({ ...setupData, userName: e.target.value })} error={!!error && activeStep === 1} + helperText="This will be the user's Access Key for MinIO" /> setSetupData({ ...setupData, userPassword: e.target.value })} error={!!error && activeStep === 1} - helperText={error || "Min 8 chars, uppercase, lowercase, and number required"} + helperText={error || "This will be the user's Secret Key - Min 8 chars, uppercase, lowercase, and number"} InputProps={{ endAdornment: ( @@ -317,7 +326,7 @@ const QuickStartWizard: React.FC = ({ @@ -326,7 +335,7 @@ const QuickStartWizard: React.FC = ({