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

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