mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-18 03:10:39 +01:00
remove == true
This commit is contained in:
@@ -71,7 +71,7 @@ object ProtectedBranchService {
|
||||
pusher: String,
|
||||
mergePullRequest: Boolean
|
||||
)(implicit session: Session): Option[String] = {
|
||||
if (mergePullRequest == true) {
|
||||
if (mergePullRequest) {
|
||||
None
|
||||
} else {
|
||||
checkBranchProtection(owner, repository, receivePack, command, pusher)
|
||||
|
||||
@@ -38,7 +38,7 @@ trait OwnerAuthenticator { self: ControllerBase with RepositoryService with Acco
|
||||
case Some(x) if (repository.owner == x.userName) => action(repository)
|
||||
// TODO Repository management is allowed for only group managers?
|
||||
case Some(x) if (getGroupMembers(repository.owner).exists { m =>
|
||||
m.userName == x.userName && m.isManager == true
|
||||
m.userName == x.userName && m.isManager
|
||||
}) =>
|
||||
action(repository)
|
||||
case Some(x) if (getCollaboratorUserNames(userName, repoName, Seq(Role.ADMIN)).contains(x.userName)) =>
|
||||
|
||||
@@ -41,7 +41,7 @@ class Mailer(settings: SystemSettings) {
|
||||
htmlMsg: Option[String] = None,
|
||||
loginAccount: Option[Account] = None
|
||||
): Option[HtmlEmail] = {
|
||||
if (settings.notification == true) {
|
||||
if (settings.notification) {
|
||||
settings.smtp.map { smtp =>
|
||||
val email = new HtmlEmail
|
||||
email.setHostName(smtp.host)
|
||||
@@ -51,7 +51,7 @@ class Mailer(settings: SystemSettings) {
|
||||
}
|
||||
smtp.ssl.foreach { ssl =>
|
||||
email.setSSLOnConnect(ssl)
|
||||
if (ssl == true) {
|
||||
if (ssl) {
|
||||
email.setSslSmtpPort(smtp.port.get.toString)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
|
||||
)(implicit context: Context): Html = {
|
||||
|
||||
val avatarHtml = avatar(userName, size, tooltip, mailAddress)
|
||||
val contentHtml = if (label == true) Html(avatarHtml.body + " " + userName) else avatarHtml
|
||||
val contentHtml = if (label) Html(avatarHtml.body + " " + userName) else avatarHtml
|
||||
|
||||
userWithContent(userName, mailAddress)(contentHtml)
|
||||
}
|
||||
@@ -446,14 +446,14 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
|
||||
}
|
||||
result.append(c)
|
||||
}
|
||||
case '>' if tag == true => {
|
||||
case '>' if tag => {
|
||||
tag = false
|
||||
result.append(c)
|
||||
}
|
||||
case _ if tag == false => {
|
||||
text.append(c)
|
||||
}
|
||||
case _ if tag == true => {
|
||||
case _ if tag => {
|
||||
result.append(c)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user