keycloak-demo/utils/acl.js

11 lines
219 B
JavaScript
Raw Normal View History

2021-09-01 13:15:26 +00:00
const ALLOW_GROUPS = new Set(['/professorx'])
const mod = {}
module.exports = mod
mod.checkAllow = groups => {
if (!Array.isArray(groups)) return false
return groups.filter(t => ALLOW_GROUPS.has(t)).length > 0
}