diff --git a/src/main/scala/app/IssuesController.scala b/src/main/scala/app/IssuesController.scala index f62b86f..22544e7 100644 --- a/src/main/scala/app/IssuesController.scala +++ b/src/main/scala/app/IssuesController.scala @@ -14,7 +14,7 @@ with ReadableUsersAuthenticator with ReferrerAuthenticator with CollaboratorsAuthenticator trait IssuesControllerBase extends ControllerBase { - self: IssuesService with RepositoryService with LabelsService with MilestonesService with ActivityService + self: IssuesService with RepositoryService with AccountService with LabelsService with MilestonesService with ActivityService with ReadableUsersAuthenticator with ReferrerAuthenticator with CollaboratorsAuthenticator => case class IssueCreateForm(title: String, content: Option[String], @@ -65,7 +65,7 @@ _, getComments(owner, name, issueId.toInt), getIssueLabels(owner, name, issueId.toInt), - (getCollaborators(owner, name) :+ owner).sorted, + (getCollaborators(owner, name) ::: (if(getAccountByUserName(owner).get.isGroupAccount) Nil else List(owner))).sorted, getMilestonesWithIssueCount(owner, name), getLabels(owner, name), hasWritePermission(owner, name, context.loginAccount), @@ -77,7 +77,7 @@ get("/:owner/:repository/issues/new")(readableUsersOnly { repository => defining(repository.owner, repository.name){ case (owner, name) => issues.html.create( - (getCollaborators(owner, name) :+ owner).sorted, + (getCollaborators(owner, name) ::: (if(getAccountByUserName(owner).get.isGroupAccount) Nil else List(owner))).sorted, getMilestones(owner, name), getLabels(owner, name), hasWritePermission(owner, name, context.loginAccount), diff --git a/src/main/scala/app/PullRequestsController.scala b/src/main/scala/app/PullRequestsController.scala index c234bc6..9e811ef 100644 --- a/src/main/scala/app/PullRequestsController.scala +++ b/src/main/scala/app/PullRequestsController.scala @@ -24,7 +24,7 @@ with ReferrerAuthenticator with CollaboratorsAuthenticator trait PullRequestsControllerBase extends ControllerBase { - self: RepositoryService with IssuesService with MilestonesService with ActivityService with PullRequestService + self: RepositoryService with AccountService with IssuesService with MilestonesService with ActivityService with PullRequestService with ReferrerAuthenticator with CollaboratorsAuthenticator => val pullRequestForm = mapping( @@ -74,7 +74,7 @@ pulls.html.pullreq( issue, pullreq, getComments(owner, name, issueId), - (getCollaborators(owner, name) :+ owner).sorted, + (getCollaborators(owner, name) ::: (if(getAccountByUserName(owner).get.isGroupAccount) Nil else List(owner))).sorted, getMilestonesWithIssueCount(owner, name), commits, diffs, diff --git a/src/main/scala/app/RepositorySettingsController.scala b/src/main/scala/app/RepositorySettingsController.scala index a9285fd..cd2b47f 100644 --- a/src/main/scala/app/RepositorySettingsController.scala +++ b/src/main/scala/app/RepositorySettingsController.scala @@ -188,6 +188,8 @@ override def validate(name: String, value: String): Option[String] = getAccountByUserName(value) match { case None => Some("User does not exist.") + case Some(x) if(x.isGroupAccount) + => Some("User does not exist.") case Some(x) if(x.userName == params("owner") || getCollaborators(params("owner"), params("repository")).contains(x.userName)) => Some("User can access this repository already.") case _ => None diff --git a/src/main/scala/servlet/GitRepositoryServlet.scala b/src/main/scala/servlet/GitRepositoryServlet.scala index e16f48c..1ae0062 100644 --- a/src/main/scala/servlet/GitRepositoryServlet.scala +++ b/src/main/scala/servlet/GitRepositoryServlet.scala @@ -149,7 +149,7 @@ "(^|\\W)#(\\d+)(\\W|$)".r.findAllIn(commit.fullMessage).matchData.foreach { matchData => val issueId = matchData.group(2) if(getAccountByUserName(commit.committer).isDefined && getIssue(owner, repository, issueId).isDefined){ - createComment(owner, repository, commit.committer, issueId.toInt, commit.fullMessage, "commit") + createComment(owner, repository, commit.committer, issueId.toInt, commit.id + " " + commit.fullMessage, "commit") } } } diff --git a/src/main/twirl/issues/commentlist.scala.html b/src/main/twirl/issues/commentlist.scala.html index 3c19aa4..4071dcf 100644 --- a/src/main/twirl/issues/commentlist.scala.html +++ b/src/main/twirl/issues/commentlist.scala.html @@ -21,7 +21,14 @@