Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add system managed groups for all admins, viewers, and all org members #356

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

golanglemonade
Copy link
Member

@golanglemonade golanglemonade commented Jan 1, 2025

Auto-creates three groups for new organizations (excluding personal orgs).

  1. Admins - includes all users with the owner or admin role in the organization
  2. Viewers - includes all users with the member role in the organization
  3. All Members - includes all users in the organization

These groups can not be manually updated and the isManaged field is not exposed on update/create operations.

go run cmd/cli/main.go group get                                       
  ID                          NAME         DISPLAY NAME  DESCRIPTION                                         VISIBILITY  MANAGED  ORGANIZATION  MEMBERS  
  01JGJ3ZRFQVVFMC8S0TXFTDZGW  Admins       Admins        Openlane managed group containing all organization  PUBLIC      true     meowmeow      2        
                                                         admins with full access                                                                         
  01JGJ3ZRFQVVFMC8S0V18YW6V9  Viewers      Viewers       Openlane managed group containing all organization  PUBLIC      true     meowmeow      1        
                                                         members with only view access                                                                   
  01JGJ3ZRFQVVFMC8S0V5ZGQ6CH  All Members  All Members   Openlane managed group containing all members of    PUBLIC      true     meowmeow      3        
                                                         the organization   

Attempts to update group members of a managed group results in an error:

go run cmd/cli/main.go group-members create -u 01JGJ4056VVHQ7GHHAC0M0R9R5 -g 01JGJ5SDZVHHWHKAKZ4QX2X67X
Error: {"networkErrors":null,"graphqlErrors":[{"message":"managed groups cannot be modified","path":["createGroupMembership"]}]}

Resolves: #229

Copy link

sonarqubecloud bot commented Jan 2, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
6.3% Coverage on New Code (required ≥ 20%)

See analysis details on SonarQube Cloud

…hz mutation file is manually edited

Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] auto-create groups within an organization
1 participant