Add cross-app super admin group; rename Executive page to Overview
- app_super_admin is a new cross-app LDAP group (also recognized by proxy and jump-host) that grants full admin here regardless of app_sso_admin membership: bypassed centrally in utils/permission.js's byGroup, folded into GET /api/user/me's isAdmin flag, and added to nav/forceLogin gates alongside app_sso_admin. - Renamed the Executive page to Overview (route, view, API path /api/metrics/overview, nav label, docs), keeping /executive as a 301 redirect alongside the existing /admin, /notifications, /dashboard legacy redirects.
This commit is contained in:
@@ -2,7 +2,16 @@
|
||||
|
||||
const {Group} = require('../models/group_ldap');
|
||||
|
||||
const SUPER_ADMIN_GROUP = 'app_super_admin';
|
||||
|
||||
let byGroup = async function(user, groups, ownerOf){
|
||||
try{
|
||||
let superAdmin = await Group.get(SUPER_ADMIN_GROUP);
|
||||
if(superAdmin.member.includes(user.dn)) return true
|
||||
}catch(error){
|
||||
// group not found, continue checking
|
||||
}
|
||||
|
||||
for(let group of groups){
|
||||
try{
|
||||
group = await Group.get(group);
|
||||
@@ -28,4 +37,4 @@ let byGroup = async function(user, groups, ownerOf){
|
||||
throw error;
|
||||
}
|
||||
|
||||
module.exports = {byGroup};
|
||||
module.exports = {byGroup, SUPER_ADMIN_GROUP};
|
||||
|
||||
Reference in New Issue
Block a user