Skip to content

Conversation

javirln
Copy link
Member

@javirln javirln commented Jun 24, 2025

This patch introduces a new service, GroupService, with several endpoints for managing groups within the system. For now, it includes a basic implementation of CRUD operations and the ability to list members within a group. Member management (adding/removing users) will be handled in a separate PR as well as CLI changes.

It includes:

  • Two new tables:
    • Group: Stores general group information.
    • GroupUser: A join table between Groups and Users that tracks user-specific metadata, such as whether the user is a group maintainer, when they were added, updated, or removed from the group.
  • Tests of the biz layer
  • Audit logs events:
    • GroupCreated
    • GroupUpdated
    • GroupDeleted
  • Authz policies for the groups:
    • Only Organization admins/owners can perform all operations to the groups and group members.

Ref: #2120

@javirln javirln force-pushed the feat/pfm-3208-first branch 2 times, most recently from 3b577ef to 4ddb8b9 Compare June 25, 2025 09:23
@javirln javirln self-assigned this Jun 25, 2025
@javirln javirln requested review from migmartri and jiparis June 25, 2025 09:50
@javirln javirln marked this pull request as ready for review June 25, 2025 09:50
@javirln javirln changed the title WIP chore(groups): Initial implementation of user groups chore(groups): Initial implementation of user groups Jun 25, 2025
Copy link
Member

@jiparis jiparis left a comment

Choose a reason for hiding this comment

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

I think you didn't push yet the membership part, right?

// Optional filter to search by group description
optional string description = 2;
// Optional filter to search by member email address
optional string member_email = 3;
Copy link
Member

Choose a reason for hiding this comment

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

Is this to search groups where this person is a member?

Copy link
Member

@migmartri migmartri left a comment

Choose a reason for hiding this comment

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

Thanks @javirln added some comments inline, but in general lgtm

javirln added 2 commits June 26, 2025 08:19
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
@javirln javirln force-pushed the feat/pfm-3208-first branch from 38baefc to 39bf72b Compare June 26, 2025 06:23
@javirln
Copy link
Member Author

javirln commented Jun 26, 2025

I think you didn't push yet the membership part, right?

No, the membership management will come in the next PR I have ready that depends on this one.

@javirln
Copy link
Member Author

javirln commented Jun 26, 2025

@jiparis @migmartri with regard the comment on what's the filter about email user. That's indeed to search the groups a member is part of. Conbined with the filter about maintainers, we can perform look ups to know the groups a specific person is part of. I've added because it seems reasonable to me to be honest and can be useful for admins/owners.

Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
@javirln javirln merged commit b1a3845 into chainloop-dev:main Jun 26, 2025
13 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