Skip to content

Conversation

@mms-gianni
Copy link
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Template (non-breaking change which adds a template)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • I've built the image and tested it on a kubernetes cluster

Test Configuration:

  • Operator Version:
  • Kubernetes Version:
  • Kubero CLI Version (if applicable):

Checklist:

  • I removed unnecessary debug logs
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I documented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@mms-gianni mms-gianni requested a review from Copilot July 8, 2025 21:06
@mms-gianni mms-gianni self-assigned this Jul 8, 2025
@mms-gianni mms-gianni added the feature New feature or request label Jul 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds team-based access control by propagating userGroups through service and controller layers, filtering pipelines based on team membership, and updating the UI to display access teams.

  • Propagate userGroups parameter to security, apps, deployments, logs, and pipelines services/controllers
  • Introduce access.teams in IPipeline and filter pipelines in KubernetesService.getPipelinesList
  • Update pipeline list UI to show team chips and adjust account views

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
server/src/security/security.service.ts Added userGroups to context and app fetch calls in security
server/src/security/security.controller.ts Injected Request and passed userGroups to security service
server/src/repo/repo.service.ts Hardcoded ['admin'] for internal rebuild/delete workflows
server/src/pipelines/pipelines.service.ts Added userGroups arguments and forwarded to getContext
server/src/pipelines/pipelines.interface.ts Added optional access.teams field to IPipeline
server/src/pipelines/pipelines.controller.ts Passed userGroups from request to service methods
server/src/logs/logs.service.ts Propagated userGroups through log retrieval; unused import
server/src/logs/logs.controller.ts Injected Request and forwarded userGroups to logs service
server/src/kubernetes/kubernetes.service.ts Filtered pipelines by access.teams using userGroups
server/src/deployments/deployments.service.ts Forwarded userGroups to deployment operations
server/src/deployments/deployments.controller.ts Injected Request and forwarded userGroups
server/src/apps/apps.service.ts Added userGroups to all app operations (create, update, delete, rebuild, etc.)
server/src/apps/apps.controller.ts Injected Request and forwarded userGroups to app endpoints
client/src/components/pipelines/list.vue Display team chips and extend Pipeline type
client/src/components/accounts/users.vue Updated team chip icon and username formatting
client/src/components/accounts/teams.vue Added icon to team chip
Comments suppressed due to low confidence (1)

server/src/kubernetes/kubernetes.service.ts:224

  • The new team-based filter logic for pipelines should have corresponding unit or integration tests to verify that access rules are enforced correctly for various userGroups scenarios.
      pipelines.items = pipelines.items.filter((pipeline) => {

this.notificationsService.send(m);

this.appsService.rebuildApp(app);
this.appsService.rebuildApp(app, ['admin']); // return all pipelines to search for the app
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider extracting the hardcoded ['admin'] group into a constant or configuration to avoid duplicate literals and make future changes easier.

Suggested change
this.appsService.rebuildApp(app, ['admin']); // return all pipelines to search for the app
this.appsService.rebuildApp(app, RepoService.DEFAULT_GROUPS); // return all pipelines to search for the app

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mms-gianni
Copy link
Member Author

Works as expected.

image

@mms-gianni mms-gianni merged commit aca59fc into main Jul 9, 2025
2 of 3 checks passed
@mms-gianni mms-gianni deleted the feature/teams-filter branch September 3, 2025 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants