<commit_before>package com.metl.snippet

import com.metl.data._
import com.metl.utils._


import net.liftweb._
import http._
import SHtml._
import common._
import util._
import Helpers._
import scala.xml._
import com.metl.comet._
import com.metl.model._
import Globals._

object Metl extends Metl
class Metl extends Logger {
  def shouldModifyConversation(username:String, c:Conversation):Boolean = {
    username.toLowerCase.trim == c.author.toLowerCase.trim && c != Conversation.empty
  }
  def shouldDisplayConversation(c:Conversation):Boolean = {
    (c.subject.toLowerCase == "unrestricted" || Globals.getUserGroups.exists((ug:Tuple2[String,String]) => ug._2.toLowerCase.trim == c.subject.toLowerCase.trim)) && c != Conversation.empty
  }
  def shouldPublishInConversation(username:String,c:Conversation):Boolean = {
    (shouldModifyConversation(username,c) || c.permissions.studentsCanPublish) && c != Conversation.empty
  }
  def boardFor():String = {
    "/board"   
  }
  def boardFor(conversationJid:Int):String = {
    "/board?conversationJid=%s".format(conversationJid)
  }
  def boardFor(conversationJid:Int,slideId:Int):String = {
    "/board?conversationJid=%s&slideId=%s".format(conversationJid,slideId)
  }
  def noBoard:String = {
    "/"///conversationSearch"
  }

  lazy val serverConfig = ServerConfiguration.default<commit_msg>blacklist is now honoured backend in the shouldPublishInConversation<commit_after>package com.metl.snippet

import com.metl.data._
import com.metl.utils._


import net.liftweb._
import http._
import SHtml._
import common._
import util._
import Helpers._
import scala.xml._
import com.metl.comet._
import com.metl.model._
import Globals._

object Metl extends Metl
class Metl extends Logger {
  def shouldModifyConversation(username:String, c:Conversation):Boolean = {
    username.toLowerCase.trim == c.author.toLowerCase.trim && c != Conversation.empty
  }
  def shouldDisplayConversation(c:Conversation):Boolean = {
    (c.subject.toLowerCase == "unrestricted" || Globals.getUserGroups.exists((ug:Tuple2[String,String]) => ug._2.toLowerCase.trim == c.subject.toLowerCase.trim)) && c != Conversation.empty
  }
  def shouldPublishInConversation(username:String,c:Conversation):Boolean = {
    (shouldModifyConversation(username,c) || (c.permissions.studentsCanPublish && !c.blackList.contains(username))) && c != Conversation.empty
  }
  def boardFor():String = {
    "/board"   
  }
  def boardFor(conversationJid:Int):String = {
    "/board?conversationJid=%s".format(conversationJid)
  }
  def boardFor(conversationJid:Int,slideId:Int):String = {
    "/board?conversationJid=%s&slideId=%s".format(conversationJid,slideId)
  }
  def noBoard:String = {
    "/"///conversationSearch"
  }

  lazy val serverConfig = ServerConfiguration.default
{'fraction_non_alphanumeric': 0.12786532951289398, 'fraction_numerical': 0.0014326647564469914, 'mean_word_length': 5.019396551724138, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '662894', 'n_tokens_mistral': 898, 'n_tokens_neox': 907, 'n_words': 151}