Skip the group popup when user has no group

This commit is contained in:
michaeljayt
2014-12-30 14:20:05 +08:00
parent a1f09117b0
commit aed15a7f25
3 changed files with 29 additions and 2 deletions

View File

@@ -436,6 +436,10 @@ trait RepositoryViewerControllerBase extends ControllerBase {
repo.html.files(revision, repository,
if(path == ".") Nil else path.split("/").toList, // current path
context.loginAccount match {
case None => List()
case account: Option[model.Account] => getGroupsByUserName(account.get.userName)
}, // groups of current user
new JGitUtil.CommitInfo(lastModifiedCommit), // last modified commit
files, readme, hasWritePermission(repository.owner, repository.name, context.loginAccount),
flash.get("info"), flash.get("error"))