<commit_before>'use strict';

/**
 * Permission module configuration provider
 *
 * @name permission.permissionConfigProvider
 */
function permissionConfig() {
  'ngInject';

  var defaultOnAuthorizedMethod = 'showElement';
  var defaultOnUnauthorizedMethod = 'hideElement';

  /**
   * Methods allowing to alter default directive onAuthorized behaviour in permission directive
   *
   * @param onAuthorizedMethod {String} One of permission.PermPermissionStrategies method names
   */
  this.setDefaultOnAuthorizedMethod = function (onAuthorizedMethod) {
    defaultOnAuthorizedMethod = onAuthorizedMethod;
  };

  /**
   * Methods allowing to alter default directive onUnauthorized behaviour in permission directive
   *
   * @param onUnauthorizedMethod {String} One of permission.PermPermissionStrategies method names
   */
  this.setDefaultOnUnauthorizedMethod = function (onUnauthorizedMethod) {
    defaultOnUnauthorizedMethod = onUnauthorizedMethod;
  };

  this.$get = function () {
    return {
      defaultOnAuthorizedMethod: defaultOnAuthorizedMethod,
      defaultOnUnauthorizedMethod: defaultOnUnauthorizedMethod
    };<commit_msg>feat: #387 - Configuration of default directive behaviour<commit_after>'use strict';

/**
 * Permission module configuration provider
 *
 * @name permission.permissionConfigProvider
 */
function permissionConfig() {
  'ngInject';

  var defaultOnAuthorizedMethod = 'showElement';
  var defaultOnUnauthorizedMethod = 'hideElement';

  /**
   * Methods allowing to alter default directive onAuthorized behaviour in permission directive
   *
   * @param onAuthorizedMethod {String} One of permission.PermPermissionStrategies method names
   */
  this.setDefaultOnAuthorizedMethod = function (onAuthorizedMethod) { // jshint ignore:line
    defaultOnAuthorizedMethod = onAuthorizedMethod;
  };

  /**
   * Methods allowing to alter default directive onUnauthorized behaviour in permission directive
   *
   * @param onUnauthorizedMethod {String} One of permission.PermPermissionStrategies method names
   */
  this.setDefaultOnUnauthorizedMethod = function (onUnauthorizedMethod) { // jshint ignore:line
    defaultOnUnauthorizedMethod = onUnauthorizedMethod;
  };


  this.$get = function () {   // jshint ignore:line
    return {
      defaultOnAuthorizedMethod: defaultOnAuthorizedMethod,
      defaultOnUnauthorizedMethod: defaultOnUnauthorizedMethod
    };
{'fraction_non_alphanumeric': 0.07496876301541025, 'fraction_numerical': 0.0012494793835901709, 'mean_word_length': 4.7601918465227815, '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': '3727436', 'n_tokens_mistral': 618, 'n_tokens_neox': 593, 'n_words': 156}