<commit_before>'use strict';

const {isAdmin, ifNotLocal} = require('../../../hooks');
const hooks = require('feathers-hooks');
const auth = require('feathers-authentication').hooks;

exports.before = {
  all: [
    auth.verifyToken(),
    auth.populateUser(),
    auth.restrictToAuthenticated()
  ],
  find: [],
  get: [],
  create: [ifNotLocal(isAdmin())],
  update: [ifNotLocal(isAdmin())],
  patch: [ifNotLocal(isAdmin())],
  remove: [ifNotLocal(isAdmin())]
};

exports.after = {
  all: [],
  find: [],
  get: [],
  create: [],
  update: [],
  patch: [],
  remove: []
};<commit_msg>Relax authentication requirements on system service<commit_after>'use strict';

const {isAdmin, ifNotLocal} = require('../../../hooks');
const hooks = require('feathers-hooks');
const auth = require('feathers-authentication').hooks;

exports.before = {
	all: [],
	find: [],
	get: [],
	create: [
		auth.verifyToken(),
		auth.populateUser(),
		auth.restrictToAuthenticated(),
		ifNotLocal(isAdmin())],
	update: [
		auth.verifyToken(),
		auth.populateUser(),
		auth.restrictToAuthenticated(),
		ifNotLocal(isAdmin())],
	patch: [
		auth.verifyToken(),
		auth.populateUser(),
		auth.restrictToAuthenticated(),
		ifNotLocal(isAdmin())],
	remove: [
		auth.verifyToken(),
		auth.populateUser(),
		auth.restrictToAuthenticated(),
		ifNotLocal(isAdmin())]
};

exports.after = {
	all: [],
	find: [],
	get: [],
	create: [],
	update: [],
	patch: [],
	remove: []
};
{'fraction_non_alphanumeric': 0.20668058455114824, 'fraction_numerical': 0.0, 'mean_word_length': 4.467680608365019, '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': '2957900', 'n_tokens_mistral': 512, 'n_tokens_neox': 505, 'n_words': 84}