SAST False Positive Detection – Frontend – Expose toggle to Security Managers
# TL;DR Extend the `visibleSettings` allowlist to show the SAST False Positive Detection toggle to Security Managers on the project settings page. ## Acceptance Criteria - [ ] Security Manager sees the SAST FP toggle on the GitLab Duo settings section - [ ] Security Manager sees only permitted toggles (SAST VR + FP); other Duo settings remain hidden - [ ] `DUO_SAST_FP_DETECTION_ENABLED` constant is added to frontend constants - [ ] `gitlab_duo_visible_settings` helper returns FP identifier for Security Managers - [ ] Frontend specs and feature spec are added ## Implementation Details **Files to modify:** | File | Change | |------|--------| | `app/assets/javascripts/pages/projects/shared/permissions/constants.js` | Add `export const DUO_SAST_FP_DETECTION_ENABLED = 'duoSastFpDetectionEnabled';` | | `app/assets/javascripts/pages/projects/shared/permissions/components/gitlab_duo_settings.vue` | Import new constant; add `v-if="isSettingVisible($options.DUO_SAST_FP_DETECTION_ENABLED)"` guard to the SAST FP toggle row | | `ee/app/helpers/ee/projects_helper.rb` | Extend `gitlab_duo_visible_settings` to include `'duoSastFpDetectionEnabled'` for Security Managers | | `ee/spec/helpers/projects_helper_spec.rb` | Test `visibleSettings` includes `duoSastFpDetectionEnabled` | | `spec/frontend/pages/projects/shared/permissions/components/gitlab_duo_settings_spec.js` | Add specs for FP toggle visibility | | `ee/spec/features/projects/settings/security_manager_manages_fp_setting_spec.rb` | Create feature spec (mirror `security_manager_manages_sast_vr_setting_spec.rb`) | **Reference implementation:** See !239266 for the exact pattern used for SAST VR (`DUO_SAST_VR_WORKFLOW_ENABLED`). ## Testing Approach - [ ] Unit tests for helper and Vue component - [ ] Feature spec for end-to-end validation - [ ] Manual validation steps: 1. Start GDK with `GITLAB_SECURITY_MANAGER_ROLE=true` 2. Enable feature flags: `update_sast_vr_setting_permission` 3. Login as Security Manager 4. Navigate to project Settings → General → GitLab Duo 5. Verify only SAST VR and SAST FP toggles are visible 6. Verify the FP toggle can be toggled and saved ## Estimate
issue