diff options
author | Unknown <joe2010xtmf@163.com> | 2014-06-21 00:51:41 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-06-21 00:51:41 -0400 |
commit | ad5ec45dd63aa2563d113e6a9ce31180246aa5f2 (patch) | |
tree | b49f76a29faeec1bdf734375f91e5291acf09e53 /models/access.go | |
parent | 8bfa7ae7453e56191aa6f7de8067d5b6bb5a4a8b (diff) | |
download | gitea-ad5ec45dd63aa2563d113e6a9ce31180246aa5f2.tar.gz gitea-ad5ec45dd63aa2563d113e6a9ce31180246aa5f2.zip |
Fix #165
Diffstat (limited to 'models/access.go')
-rw-r--r-- | models/access.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/access.go b/models/access.go index 4a202dc6bc..cf31fc137b 100644 --- a/models/access.go +++ b/models/access.go @@ -30,7 +30,7 @@ type Access struct { func AddAccess(access *Access) error { access.UserName = strings.ToLower(access.UserName) access.RepoName = strings.ToLower(access.RepoName) - _, err := orm.Insert(access) + _, err := x.Insert(access) return err } @@ -38,13 +38,13 @@ func AddAccess(access *Access) error { func UpdateAccess(access *Access) error { access.UserName = strings.ToLower(access.UserName) access.RepoName = strings.ToLower(access.RepoName) - _, err := orm.Id(access.Id).Update(access) + _, err := x.Id(access.Id).Update(access) return err } // DeleteAccess deletes access record. func DeleteAccess(access *Access) error { - _, err := orm.Delete(access) + _, err := x.Delete(access) return err } @@ -67,7 +67,7 @@ func HasAccess(uname, repoName string, mode int) (bool, error) { UserName: strings.ToLower(uname), RepoName: strings.ToLower(repoName), } - has, err := orm.Get(access) + has, err := x.Get(access) if err != nil { return false, err } else if !has { |