<commit_before>/**
 * sessionAuthDev
 *
 * @module      :: Policy
 * @description :: Simple policy to allow any authenticated user
 *                 Assumes that your login action in one of your controllers sets `req.session.authenticated = true;`
 * @docs        :: http://sailsjs.org/#!documentation/policies
 *
 */
module.exports = function(req, res, next) {

  // Allways allowed on development-mode
  if (sails.config.environment === 'development') {
    return next();
  }

  // Or User is authenticated
  if (req.session.authenticated) {
    return next();
  }

  // Not allowed
  // (default res.forbidden() behavior can be overridden in `config/403.js)
  return res.forbidden();
};
<commit_msg>do not allow admin users to setup users<commit_after>/**
 * sessionAuthDev
 *
 * @module      :: Policy
 * @description :: Simple policy to allow any authenticated user
 *                 Assumes that your login action in one of your controllers sets `req.session.authenticated = true;`
 * @docs        :: http://sailsjs.org/#!documentation/policies
 *
 */
module.exports = function(req, res, next) {

  // Allways allowed on development-mode
  if (sails.config.environment === 'development') {
    return next();
  }

  // Or User is authenticated
  // if (req.session.authenticated) {
  //   return next();
  // }

  // Not allowed
  // (default res.forbidden() behavior can be overridden in `config/403.js)
  return res.forbidden();
};

{'fraction_non_alphanumeric': 0.13028413028413027, 'fraction_numerical': 0.004158004158004158, 'mean_word_length': 2.913279132791328, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6693867', 'n_tokens_mistral': 436, 'n_tokens_neox': 415, 'n_words': 127}