gluon.js
function (roles) {
              return Role.count({
                where: {
                  code: {
                    $in: roles
                  },
                  ownerId: req[options.auth.model].id
                }
              }).then(function (data) {
                return data == roles.length
              }).catch(function (err) {
                res.database(err)
              });
            }
function (roles) {
              return Role.count({
                where: {
                  code: {
                    $in: roles
                  },
                  ownerId: req[options.auth.model].id
                }
              }).then(function (data) {
                return data == roles.length
              }).catch(function (err) {
                res.database(err)
              });
            }
function ( roles ) { return Role . count ( { where : { code : { $in : roles } , ownerId : req [ options . auth . model ] . id } } ) . then ( function ( data ) { return data == roles . length } ) . catch ( function ( err ) { res . database ( err ) } ) ; }
Checks for roles

@param {Array<String>} roles Which roles
@returns {Promise.<Boolean>}
Checks for roles