mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
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:
parent
0e72c5daeb
commit
ae99e87ed6
1 changed files with 6 additions and 6 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue