summaryrefslogtreecommitdiffstats
path: root/models/access.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-08 12:24:11 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-08 12:24:11 -0400
commite86728340654b18a657a65920c16e28a1b00cca7 (patch)
tree5ef13e753aef6fab75c78fac703945fe0938fd03 /models/access.go
parenta03f380fa86f83f35a5636535ec3002100b335bb (diff)
downloadgitea-e86728340654b18a657a65920c16e28a1b00cca7.tar.gz
gitea-e86728340654b18a657a65920c16e28a1b00cca7.zip
Assignee back end
Diffstat (limited to 'models/access.go')
-rw-r--r--models/access.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/models/access.go b/models/access.go
index 749a2604d5..4f944517ed 100644
--- a/models/access.go
+++ b/models/access.go
@@ -58,9 +58,10 @@ func UpdateAccessWithSession(sess *xorm.Session, access *Access) error {
}
// HasAccess returns true if someone can read or write to given repository.
-func HasAccess(userName, repoName string, mode int) (bool, error) {
+// The repoName should be in format <username>/<reponame>.
+func HasAccess(uname, repoName string, mode int) (bool, error) {
access := &Access{
- UserName: strings.ToLower(userName),
+ UserName: strings.ToLower(uname),
RepoName: strings.ToLower(repoName),
}
has, err := orm.Get(access)