mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
Show newsfeed of private repo to members of owner group
This commit is contained in:
@@ -31,10 +31,10 @@ trait ActivityService {
|
||||
.take(30)
|
||||
.list
|
||||
|
||||
def getRecentActivitiesByUser(loginUserName : String): List[Activity] =
|
||||
def getRecentActivitiesByOwners(owners : Set[String]): List[Activity] =
|
||||
Activities
|
||||
.innerJoin(Repositories).on((t1, t2) => t1.byRepository(t2.userName, t2.repositoryName))
|
||||
.filter { case (t1, t2) => (t2.isPrivate is false.bind) || (t2.userName is loginUserName.bind) }
|
||||
.filter { case (t1, t2) => (t2.isPrivate is false.bind) || (t2.userName inSetBind owners) }
|
||||
.sortBy { case (t1, t2) => t1.activityId desc }
|
||||
.map { case (t1, t2) => t1 }
|
||||
.take(30)
|
||||
|
||||
Reference in New Issue
Block a user