aboutsummaryrefslogtreecommitdiffstats
path: root/modules/convert/user.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-28 19:58:28 +0800
committerGitHub <noreply@github.com>2021-11-28 12:58:28 +0100
commit1fee11d69a437ec7e68b3f6b645827592fe77292 (patch)
tree1fca452f96746d9f7cc8c31723e3c365155cf96d /modules/convert/user.go
parent24a8d54bfb908a2371cb808a5243b3290dd0664a (diff)
downloadgitea-1fee11d69a437ec7e68b3f6b645827592fe77292.tar.gz
gitea-1fee11d69a437ec7e68b3f6b645827592fe77292.zip
Move accessmode into models/perm (#17828)
Diffstat (limited to 'modules/convert/user.go')
-rw-r--r--modules/convert/user.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/convert/user.go b/modules/convert/user.go
index ebe2f06460..dc4a8c49c7 100644
--- a/modules/convert/user.go
+++ b/modules/convert/user.go
@@ -5,7 +5,7 @@
package convert
import (
- "code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/perm"
user_model "code.gitea.io/gitea/models/user"
api "code.gitea.io/gitea/modules/structs"
)
@@ -36,11 +36,11 @@ func ToUsers(doer *user_model.User, users []*user_model.User) []*api.User {
// ToUserWithAccessMode convert user_model.User to api.User
// AccessMode is not none show add some more information
-func ToUserWithAccessMode(user *user_model.User, accessMode models.AccessMode) *api.User {
+func ToUserWithAccessMode(user *user_model.User, accessMode perm.AccessMode) *api.User {
if user == nil {
return nil
}
- return toUser(user, accessMode != models.AccessModeNone, false)
+ return toUser(user, accessMode != perm.AccessModeNone, false)
}
// toUser convert user_model.User to api.User