code: function (value) {
                  var validAttributes = this.getAttributes(),
                      invalidAttributes = {};
  
                  _.each(value, function (attrValue, attrName) {
                      if (!includes(validAttributes[attrName], attrValue)) {
                          invalidAttributes[attrName] = attrValue;
                      }
                  });
  
                  if (_.size(invalidAttributes) > 0) {
                      throw Error('Unable to restrict security attributes to ' + angular.toJson(invalidAttributes));
                  }
  
                  attributeFilter = value;
  
                  if (config.persistentRestrictions) {
                      attributeRestrictionsState.value(value);
                  }
                  /**
                   * @ngdoc event
                   * @name w20CoreSecurity.service:AuthorizationService#w20\.security\.attribute-filter-changed
                   * @eventOf w20CoreSecurity.service:AuthorizationService
                   * @eventType emitted on root scope
                   * @param {Object} the new map of security attributes
                   *
                   * @description
                   *
                   * This event is emitted when user roles are filtered
                   */
                  eventService.emit('w20.security.attribute-filter-changed', value);
  
                  if (_.size(value) === 0) {
                      $log.info('no security attribute restriction');
                  } else {
                      $log.info('security attribute(s) restricted to: ' + angular.toJson(value));
                  }
              }
docs: @ngdoc function
  @name w20CoreSecurity.service:AuthorizationService#setAttributeFilter
  @methodOf w20CoreSecurity.service:AuthorizationService
  @param {Object} value A subset of the result of getAttributes() which will restrict the user security attributes to it
  
  @description
  
  Allow to restrict user security attributes