diff options
Diffstat (limited to 'internal/db/repo_branch.go')
-rw-r--r-- | internal/db/repo_branch.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/repo_branch.go b/internal/db/repo_branch.go index 8da99945..ceb99231 100644 --- a/internal/db/repo_branch.go +++ b/internal/db/repo_branch.go @@ -175,7 +175,7 @@ func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whit userIDs := tool.StringsToInt64s(strings.Split(whitelistUserIDs, ",")) validUserIDs = make([]int64, 0, len(userIDs)) for _, userID := range userIDs { - has, err := HasAccess(userID, repo, ACCESS_MODE_WRITE) + has, err := HasAccess(userID, repo, AccessModeWrite) if err != nil { return fmt.Errorf("HasAccess [user_id: %d, repo_id: %d]: %v", userID, protectBranch.RepoID, err) } else if !has { @@ -193,7 +193,7 @@ func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whit if protectBranch.WhitelistTeamIDs != whitelistTeamIDs { hasTeamsChanged = true teamIDs := tool.StringsToInt64s(strings.Split(whitelistTeamIDs, ",")) - teams, err := GetTeamsHaveAccessToRepo(repo.OwnerID, repo.ID, ACCESS_MODE_WRITE) + teams, err := GetTeamsHaveAccessToRepo(repo.OwnerID, repo.ID, AccessModeWrite) if err != nil { return fmt.Errorf("GetTeamsHaveAccessToRepo [org_id: %d, repo_id: %d]: %v", repo.OwnerID, repo.ID, err) } |