feat: [CODE-2259]: update allowed repo states list for reposettings APIs (#2538)

pull/3545/head
Atefeh Mohseni Ejiyeh 2024-08-20 01:22:55 +00:00 committed by Harness
parent 471dead872
commit 8d487921a6
1 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@ func (c *Controller) getRepoCheckAccess(
repoRef string,
reqPermission enum.Permission,
) (*types.Repository, error) {
// migrating repositories need to adjust the repo settings during the import, hence expanding the allowedstates.
return repo.GetRepoCheckAccess(
ctx,
c.repoStore,
@ -63,6 +64,6 @@ func (c *Controller) getRepoCheckAccess(
session,
repoRef,
reqPermission,
repo.ActiveRepoStates,
[]enum.RepoState{enum.RepoStateActive, enum.RepoStateMigrateGitPush},
)
}