fix: allow members with git providers permission to create and delete 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
This commit is contained in:
Mauricio Siu
2026-06-30 15:56:13 -06:00
parent c2a95870f5
commit 81adbcb8f9
4 changed files with 59 additions and 0 deletions

View File

@@ -170,6 +170,8 @@ const getLegacyOverrides = (
},
gitProviders: {
read: !!memberRecord.canAccessToGitProviders,
create: !!memberRecord.canAccessToGitProviders,
delete: !!memberRecord.canAccessToGitProviders,
},
};
};