From 914ffa496f8e8e9948ca8c5596da6b0d3c17555d Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 8 May 2014 19:17:43 -0400 Subject: Show private repository activities in dashboard if has access --- models/access.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'models/access.go') diff --git a/models/access.go b/models/access.go index 4f944517..4a202dc6 100644 --- a/models/access.go +++ b/models/access.go @@ -60,6 +60,9 @@ func UpdateAccessWithSession(sess *xorm.Session, access *Access) error { // HasAccess returns true if someone can read or write to given repository. // The repoName should be in format /. func HasAccess(uname, repoName string, mode int) (bool, error) { + if len(repoName) == 0 { + return false, nil + } access := &Access{ UserName: strings.ToLower(uname), RepoName: strings.ToLower(repoName), -- cgit v1.2.3