Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1937 from djrichar/MemberRoleIdForSAMLGroupLink
Browse files Browse the repository at this point in the history
Issue: #1936 fix Missing MemberRoleId for group link creation
  • Loading branch information
svanharmelen authored May 10, 2024
2 parents aee1e19 + 3291483 commit 6c765d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@ func (s *GroupsService) GetGroupSAMLLink(gid interface{}, samlGroupName string,
type AddGroupSAMLLinkOptions struct {
SAMLGroupName *string `url:"saml_group_name,omitempty" json:"saml_group_name,omitempty"`
AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
MemberRoleID *int `url:"member_role_id,omitempty" json:"member_role_id,omitempty"`
}

// AddGroupSAMLLink creates a new group SAML link. Available only for users who
Expand Down
1 change: 1 addition & 0 deletions groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ func TestAddGroupSAMLLinkCustomRole(t *testing.T) {
opt := &AddGroupSAMLLinkOptions{
SAMLGroupName: Ptr("gitlab_group_example_developer"),
AccessLevel: Ptr(DeveloperPermissions),
MemberRoleID: Ptr(123),
}

link, _, err := client.Groups.AddGroupSAMLLink(1, opt)
Expand Down

0 comments on commit 6c765d2

Please sign in to comment.