Skip to content

Commit

Permalink
Merge pull request #10739 from benediktwerner/team-chat-mod-access
Browse files Browse the repository at this point in the history
Require Shusher perms to view team chat
  • Loading branch information
ornicar authored Mar 30, 2022
2 parents d6206eb + 202c59f commit 66a8f12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/Team.scala
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ final class Team(
team.enabled && !team.isChatFor(_.NONE) && ctx.noKid && HTTPRequest.isHuman(ctx.req) && {
(team.isChatFor(_.LEADERS) && ctx.userId.exists(team.leaders)) ||
(team.isChatFor(_.MEMBERS) && info.mine) ||
(isGranted(_.ChatTimeout) && requestModView)
(isGranted(_.Shusher) && requestModView)
}

private def canHaveForum(team: TeamModel, requestModView: Boolean)(isMember: Boolean)(implicit
Expand Down
2 changes: 1 addition & 1 deletion app/views/team/show.scala
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ object show {
a(href := routes.Team.edit(t.id), cls := "button button-empty text", dataIcon := "")(
trans.settings.settings()
),
((isGranted(_.ManageTeam) || isGranted(_.ChatTimeout)) && !requestedModView) option a(
((isGranted(_.ManageTeam) || isGranted(_.Shusher)) && !requestedModView) option a(
href := routes.Team.show(t.id, 1, mod = true),
cls := "button button-red"
)(
Expand Down

0 comments on commit 66a8f12

Please sign in to comment.