aboutsummaryrefslogtreecommitdiffstats
path: root/models/perm/access/access.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/perm/access/access.go')
-rw-r--r--models/perm/access/access.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/perm/access/access.go b/models/perm/access/access.go
index 48ecf78a8c..2d1b2daa62 100644
--- a/models/perm/access/access.go
+++ b/models/perm/access/access.go
@@ -85,8 +85,8 @@ func updateUserAccess(accessMap map[int64]*userAccess, user *user_model.User, mo
// FIXME: do cross-comparison so reduce deletions and additions to the minimum?
func refreshAccesses(ctx context.Context, repo *repo_model.Repository, accessMap map[int64]*userAccess) (err error) {
minMode := perm.AccessModeRead
- if err := repo.GetOwner(ctx); err != nil {
- return fmt.Errorf("GetOwner: %w", err)
+ if err := repo.LoadOwner(ctx); err != nil {
+ return fmt.Errorf("LoadOwner: %w", err)
}
// If the repo isn't private and isn't owned by a organization,
@@ -143,7 +143,7 @@ func refreshCollaboratorAccesses(ctx context.Context, repoID int64, accessMap ma
func RecalculateTeamAccesses(ctx context.Context, repo *repo_model.Repository, ignTeamID int64) (err error) {
accessMap := make(map[int64]*userAccess, 20)
- if err = repo.GetOwner(ctx); err != nil {
+ if err = repo.LoadOwner(ctx); err != nil {
return err
} else if !repo.Owner.IsOrganization() {
return fmt.Errorf("owner is not an organization: %d", repo.OwnerID)
@@ -199,7 +199,7 @@ func RecalculateUserAccess(ctx context.Context, repo *repo_model.Repository, uid
accessMode = collaborator.Mode
}
- if err = repo.GetOwner(ctx); err != nil {
+ if err = repo.LoadOwner(ctx); err != nil {
return err
} else if repo.Owner.IsOrganization() {
var teams []organization.Team