Skip to content

Conversation

akhilmhdh
Copy link
Member

Description 📣

This PR fixes the access-list broken and also avoid calling access-list from frontend in case you don't have license.

Added documentation for instantUpdate for k8s operator

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

@maidul98
Copy link
Collaborator

maidul98 commented Sep 25, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Summary

This PR fixes a broken access list feature and standardizes parameter naming across the codebase. The main changes include renaming workspaceId to projectId for consistency in API endpoints and ensuring the access list API is only called when users have the appropriate license subscription.

Major changes:

  • Fixed access list functionality by conditionally calling the API based on secretAccessInsights license status
  • Renamed API parameter from workspaceId to projectId across router and documentation
  • Added projectId field to webhook payloads while preserving backward compatibility with workspaceId
  • Added documentation for the instantUpdates feature in Kubernetes operator with proper paid plan disclaimers

The changes are focused on bug fixes and API consistency without introducing breaking changes.

Confidence Score: 4/5

  • This PR is safe to merge with low risk
  • Minor bug fix and parameter renaming with good backward compatibility practices, but slight redundancy in webhook payloads
  • Pay attention to webhook payload changes to ensure both old and new clients can handle the field duplication

Important Files Changed

File Analysis

Filename        Score        Overview
backend/src/ee/routes/v1/secret-router.ts 5/5 Changed query parameter from workspaceId to projectId for consistency - safe refactoring
backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts 4/5 Added projectId field to returned object while keeping workspace for backward compatibility
backend/src/services/webhook/webhook-fns.ts 4/5 Added projectId field to webhook payloads while preserving existing workspaceId field
frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretDetailSidebar.tsx 5/5 Fixed access list feature to only call API when user has license for secretAccessInsights

Sequence Diagram

sequenceDiagram
    participant Frontend as Secret Detail Sidebar
    participant API as Secret Router API
    participant Service as Secret Service
    participant License as Subscription Service

    Frontend->>License: Check subscription status
    License->>Frontend: Return secretAccessInsights flag
    
    alt Has License
        Frontend->>API: GET /secret/:name/access-list
        API->>Service: getSecretAccessList(params)
        Service->>API: Return access data
        API->>Frontend: Return {users, groups, identities}
        Frontend->>Frontend: Display access list
    else No License
        Frontend->>Frontend: Skip API call
        Note over Frontend: Access list not displayed
    end
Loading

6 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@akhilmhdh akhilmhdh merged commit 832b5f0 into main Sep 25, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants