We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4691e59 commit a7f5268Copy full SHA for a7f5268
models/repo.go
@@ -54,7 +54,7 @@ func CheckRepoUnitUser(repo *repo_model.Repository, user *user_model.User, unitT
54
}
55
56
func checkRepoUnitUser(ctx context.Context, repo *repo_model.Repository, user *user_model.User, unitType unit.Type) bool {
57
- if user.IsAdmin {
+ if user != nil && user.IsAdmin {
58
return true
59
60
perm, err := GetUserRepoPermission(ctx, repo, user)
0 commit comments