lib/main.js
function setModel(Model, modelName) {
    let authConfigs;
    if (!internals.acl) {
        throw new Error('Attempt to shield model before setting acl');
    }

    if (!internals.authConfig.length) {
        throw new Error('Attempt to shield model before seting configs');
    }

    // raise shield around Model
    new Shield(Model, internals.acl);
    authConfigs = getAuthConfigs(modelName);
    _.each(authConfigs, _.bind(Model.shield.addRules, Model.shield));
    internals.models[modelName] = Model;
}
function setModel(Model, modelName) {
    let authConfigs;
    if (!internals.acl) {
        throw new Error('Attempt to shield model before setting acl');
    }

    if (!internals.authConfig.length) {
        throw new Error('Attempt to shield model before seting configs');
    }

    // raise shield around Model
    new Shield(Model, internals.acl);
    authConfigs = getAuthConfigs(modelName);
    _.each(authConfigs, _.bind(Model.shield.addRules, Model.shield));
    internals.models[modelName] = Model;
}
function setModel ( Model , modelName ) { let authConfigs ; if ( ! internals . acl ) { throw new Error ( 'Attempt to shield model before setting acl' ) ; } if ( ! internals . authConfig . length ) { throw new Error ( 'Attempt to shield model before seting configs' ) ; } // raise shield around Model new Shield ( Model , internals . acl ) ; authConfigs = getAuthConfigs ( modelName ) ; _ . each ( authConfigs , _ . bind ( Model . shield . addRules , Model . shield ) ) ; internals . models [ modelName ] = Model ; }
Set an individual model on the internal scope after wrapping it with a shield
@param {bookshelfModel} Model is a bookshelf Model constructor
@return null;
Set an individual model on the internal scope after wrapping it with a shield