mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-01-06 15:42:20 +01:00
use exists instead of "filter().nonEmpty"
This commit is contained in:
@@ -76,7 +76,7 @@ object ProtectedBranchService {
|
||||
includeAdministrators: Boolean) extends AccountService with CommitStatusService {
|
||||
|
||||
def isAdministrator(pusher: String)(implicit session: Session): Boolean =
|
||||
pusher == owner || getGroupMembers(owner).filter(gm => gm.userName == pusher && gm.isManager).nonEmpty
|
||||
pusher == owner || getGroupMembers(owner).exists(gm => gm.userName == pusher && gm.isManager)
|
||||
|
||||
/**
|
||||
* Can't be force pushed
|
||||
|
||||
Reference in New Issue
Block a user