diff options
Diffstat (limited to 'models/perm/access')
-rw-r--r-- | models/perm/access/access.go | 2 | ||||
-rw-r--r-- | models/perm/access/repo_permission.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/models/perm/access/access.go b/models/perm/access/access.go index 55d3f78e01..48ecf78a8c 100644 --- a/models/perm/access/access.go +++ b/models/perm/access/access.go @@ -171,7 +171,7 @@ func RecalculateTeamAccesses(ctx context.Context, repo *repo_model.Repository, i continue } - if err = t.GetMembersCtx(ctx); err != nil { + if err = t.LoadMembers(ctx); err != nil { return fmt.Errorf("getMembers '%d': %w", t.ID, err) } for _, m := range t.Members { diff --git a/models/perm/access/repo_permission.go b/models/perm/access/repo_permission.go index 58c4299d16..88437dc4b2 100644 --- a/models/perm/access/repo_permission.go +++ b/models/perm/access/repo_permission.go @@ -364,7 +364,7 @@ func HasAccess(ctx context.Context, userID int64, repo *repo_model.Repository) ( var user *user_model.User var err error if userID > 0 { - user, err = user_model.GetUserByIDCtx(ctx, userID) + user, err = user_model.GetUserByID(ctx, userID) if err != nil { return false, err } |