summaryrefslogtreecommitdiffstats
path: root/modules/convert/convert.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-09 20:57:58 +0100
committerGitHub <noreply@github.com>2021-11-09 20:57:58 +0100
commit99b2858e628d92bba252be72def409af77af735b (patch)
tree56159cf10b271307911e6f01626c0c3efba789ab /modules/convert/convert.go
parenttune sqlite3 message (#17601) (diff)
downloadforgejo-99b2858e628d92bba252be72def409af77af735b.tar.xz
forgejo-99b2858e628d92bba252be72def409af77af735b.zip
Move unit into models/unit/ (#17576)
* Move unit into models/unit/ * Rename unit.UnitType as unit.Type
Diffstat (limited to 'modules/convert/convert.go')
-rw-r--r--modules/convert/convert.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/convert/convert.go b/modules/convert/convert.go
index 2960f7741a..9c5e2037c5 100644
--- a/modules/convert/convert.go
+++ b/modules/convert/convert.go
@@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/login"
+ "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
api "code.gitea.io/gitea/modules/structs"
@@ -35,7 +36,7 @@ func ToBranch(repo *models.Repository, b *git.Branch, c *git.Commit, bp *models.
var hasPerm bool
var err error
if user != nil {
- hasPerm, err = models.HasAccessUnit(user, repo, models.UnitTypeCode, models.AccessModeWrite)
+ hasPerm, err = models.HasAccessUnit(user, repo, unit.TypeCode, models.AccessModeWrite)
if err != nil {
return nil, err
}