Skip to content

Commit

Permalink
Merge pull request lichess-org#6832 from michael1241/master
Browse files Browse the repository at this point in the history
Allow ChatTimeout mods to moderate swiss chats
  • Loading branch information
ornicar authored Jun 20, 2020
2 parents c85575e + 18a5955 commit a703291
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/Swiss.scala
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ final class Swiss(
private[controllers] def canHaveChat(swiss: SwissModel.RoundInfo)(implicit ctx: Context): Fu[Boolean] =
swiss.chatFor match {
case ChatFor.NONE => fuFalse
case _ if isGranted(_.ChatTimeout) => fuTrue
case ChatFor.LEADERS => ctx.userId ?? { env.team.cached.isLeader(swiss.teamId, _) }
case ChatFor.MEMBERS => ctx.userId ?? { env.team.api.belongsTo(swiss.teamId, _) }
case _ => fuTrue
Expand Down

0 comments on commit a703291

Please sign in to comment.