Website: update has-query-generator-access policy (#25442)

Changes:
- Updated the website's has-query-generator-access policy to allow super
admins to access the query generator page.
This commit is contained in:
Eric 2025-01-14 19:40:53 -06:00 committed by GitHub
parent 0e72c5daeb
commit ae99e87ed6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,12 +23,12 @@ module.exports = async function (req, res, proceed) {
}
}//•
// Check if this user can access the query generator.
if (!req.me.canUseQueryGenerator) {
return res.forbidden();
// Then check that this user is a "super admin".
} else if (!req.me.canUseQueryGenerator && !req.me.isSuperAdmin) {
return res.forbidden();
// Check that this user is a "super admin".
if(!req.me.isSuperAdmin) {
// Then check if this user can access the query generator.
if (!req.me.canUseQueryGenerator) {
return res.forbidden();
}
}
// IWMIH, this user can access the query generator.