mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 06:25:51 +01:00
(refs #498)Returns private own repository
RepositoryService.getAllRepositories should returns private own repository too.
This commit is contained in:
@@ -176,6 +176,7 @@ trait RepositoryService { self: AccountService =>
|
|||||||
def getAllRepositories(userName: String)(implicit s: Session): List[(String, String)] = {
|
def getAllRepositories(userName: String)(implicit s: Session): List[(String, String)] = {
|
||||||
Repositories.filter { t1 =>
|
Repositories.filter { t1 =>
|
||||||
(t1.isPrivate === false.bind) ||
|
(t1.isPrivate === false.bind) ||
|
||||||
|
(t1.userName === userName.bind) ||
|
||||||
(Collaborators.filter { t2 => t2.byRepository(t1.userName, t1.repositoryName) && (t2.collaboratorName === userName.bind)} exists)
|
(Collaborators.filter { t2 => t2.byRepository(t1.userName, t1.repositoryName) && (t2.collaboratorName === userName.bind)} exists)
|
||||||
}.sortBy(_.lastActivityDate desc).map{ t =>
|
}.sortBy(_.lastActivityDate desc).map{ t =>
|
||||||
(t.userName, t.repositoryName)
|
(t.userName, t.repositoryName)
|
||||||
|
|||||||
Reference in New Issue
Block a user