code: function(objects, user, action, model, body) {
      if (!_.isArray(objects)) {
        return PermissionService.isAllowedToPerformSingle(user.id, action, model, body)(objects);
      }
      return Promise.all(objects.map(PermissionService.isAllowedToPerformSingle(user.id, action, model, body)))
        .then(function (allowedArray) {
          return allowedArray.every(function (allowed) {
            return allowed === true;
          });
        });
    }
docs: Check if the user (out of role) is granted to perform action on given objects
  @param objects
  @param user
  @param action
  @param model
  @param body
  @returns {*}