<commit_before>kd             = require 'kd'

lazyrouter     = require 'app/lazyrouter'
registerRoutes = require 'app/util/registerRoutes'


handleSection = (callback)->
  kd.getSingleton('groupsController').ready ->
    kd.singleton('appManager').open 'Environments', callback

handle = ({params:{section}}) ->
  handleSection (app) ->
    # Reference for future requirements. ~ GG
    # app.loadSection title: section

module.exports = -> lazyrouter.bind 'environments', (type, info, state, path, ctx) ->

  switch type<commit_msg>Environments: disable /Environments for non super-admins<commit_after>kd             = require 'kd'
globals        = require 'globals'

lazyrouter     = require 'app/lazyrouter'
checkFlag      = require 'app/util/checkFlag'
registerRoutes = require 'app/util/registerRoutes'


handleSection = (callback) ->
  kd.getSingleton('groupsController').ready ->

    if globals.config.environment isnt 'dev' or not checkFlag 'super-admin'
      kd.getSingleton('router').handleRoute '/'
      return

    kd.singleton('appManager').open 'Environments', callback

handle = ({params:{section}}) ->
  handleSection (app) ->
    # Reference for future requirements. ~ GG
    # app.loadSection title: section

module.exports = -> lazyrouter.bind 'environments', (type, info, state, path, ctx) ->

  switch type
{'fraction_non_alphanumeric': 0.13007518796992482, 'fraction_numerical': 0.0, 'mean_word_length': 3.7535714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '4142008', 'n_tokens_mistral': 402, 'n_tokens_neox': 392, 'n_words': 94}