Skip to content

fix: allow members with git providers permission to create/delete their own providers#4713

Merged
Siumauricio merged 1 commit into
canaryfrom
fix/member-git-providers-create-delete
Jun 30, 2026
Merged

fix: allow members with git providers permission to create/delete their own providers#4713
Siumauricio merged 1 commit into
canaryfrom
fix/member-git-providers-create-delete

Conversation

@Siumauricio

Copy link
Copy Markdown
Contributor

Problem

Closes #4695

In the free / self-hosted permission model, the Git Providers toggle (canAccessToGitProviders) only granted read access. A member with that toggle enabled could not add a git provider, because the create/delete endpoints require gitProviders.create / gitProviders.delete, and the frontend hides the "Add" buttons when permissions.gitProviders.create is false.

This was inconsistent with the SSH Keys toggle (canAccessToSSHKeys), which already grants read + create + delete from a single switch with the same "access to the … section" wording.

Changes

  • gitProviders legacy override now grants read, create and delete when the toggle is on, matching SSH Keys.
  • The gitProvider.remove endpoint now restricts non owner/admin roles to deleting only their own providers (consistent with the existing ownership model used for visibility and sharing). Owner/admin can still delete any provider in the organization.
  • Added unit tests in check-permission and resolve-permissions covering create/delete via the toggle and the off case.

… their own

The canAccessToGitProviders legacy override only granted read access, so
members with the Git Providers toggle enabled could not add providers — the
create/delete endpoints require gitProviders.create / gitProviders.delete.
This mirrors how the SSH Keys toggle already grants read/create/delete.

The git-provider remove endpoint now restricts non owner/admin roles to
deleting only their own providers (matching the ownership model used for
visibility and sharing), while owner/admin can still delete any provider in
the organization.

Closes #4695
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 30, 2026
@Siumauricio Siumauricio merged commit aa72091 into canary Jun 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to add git provider as member

1 participant