diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-28 19:58:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-28 12:58:28 +0100 |
commit | 1fee11d69a437ec7e68b3f6b645827592fe77292 (patch) | |
tree | 1fca452f96746d9f7cc8c31723e3c365155cf96d /models/repo_list.go | |
parent | 24a8d54bfb908a2371cb808a5243b3290dd0664a (diff) | |
download | gitea-1fee11d69a437ec7e68b3f6b645827592fe77292.tar.gz gitea-1fee11d69a437ec7e68b3f6b645827592fe77292.zip |
Move accessmode into models/perm (#17828)
Diffstat (limited to 'models/repo_list.go')
-rw-r--r-- | models/repo_list.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/repo_list.go b/models/repo_list.go index ff86f61577..dbcf0609bd 100644 --- a/models/repo_list.go +++ b/models/repo_list.go @@ -9,6 +9,7 @@ import ( "strings" "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/perm" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" @@ -431,7 +432,7 @@ func accessibleRepositoryCondition(user *user_model.User) builder.Cond { From("`access`"). Where(builder.And( builder.Eq{"user_id": user.ID}, - builder.Gt{"mode": int(AccessModeNone)}))), + builder.Gt{"mode": int(perm.AccessModeNone)}))), // 3. Repositories that we directly own builder.Eq{"`repository`.owner_id": user.ID}, // 4. Be able to see all repositories that we are in a team |