fix: code linting auth.js

This commit is contained in:
NGPixel 2020-02-07 22:02:33 -05:00
parent 48ea692afe
commit 1b4d8142f3

View File

@ -173,7 +173,7 @@ module.exports = {
user.groups.forEach(grp => { user.groups.forEach(grp => {
const grpId = _.isObject(grp) ? _.get(grp, 'id', 0) : grp const grpId = _.isObject(grp) ? _.get(grp, 'id', 0) : grp
_.get(WIKI.auth.groups, `${grpId}.pageRules`, []).forEach(rule => { _.get(WIKI.auth.groups, `${grpId}.pageRules`, []).forEach(rule => {
if(_.intersection(rule.roles, permissions).length > 0) { if (_.intersection(rule.roles, permissions).length > 0) {
switch (rule.match) { switch (rule.match) {
case 'START': case 'START':
if (_.startsWith(`/${page.path}`, `/${rule.path}`)) { if (_.startsWith(`/${page.path}`, `/${rule.path}`)) {