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:
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
app.auth.forceLogin(['app_sso_admin', 'app_sso_directory_admin']);
|
||||
app.auth.forceLogin(['app_sso_admin', 'app_sso_directory_admin', 'admin']);
|
||||
|
||||
// --- Resource modal tab content, built once. Populated via .val() in
|
||||
// openAddModal/openEditModal AFTER app.modal.open() has (re)built the
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
app.auth.forceLogin('app_sso_admin');
|
||||
app.auth.forceLogin(['app_sso_admin', 'admin']);
|
||||
|
||||
$(document).ready(async function(){
|
||||
userlist = (await app.user.list()).results;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%- include('top') %>
|
||||
|
||||
<script type="text/javascript">
|
||||
app.auth.forceLogin('app_sso_admin');
|
||||
app.auth.forceLogin(['app_sso_admin', 'admin']);
|
||||
|
||||
// ── Overview (stats, recent signups, inactive users) ────────────────────
|
||||
async function loadDashboard() {
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
async function loadMetrics() {
|
||||
try {
|
||||
const data = await app.api.get('metrics/executive');
|
||||
const data = await app.api.get('metrics/overview');
|
||||
if (data && data.results) {
|
||||
const renderList = (items, id) => {
|
||||
const el = document.getElementById(id);
|
||||
@@ -213,7 +213,7 @@
|
||||
<div class="container mt-4">
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
<h4 class="mb-0"><i class="fa-solid fa-gauge-high"></i> Executive Dashboard</h4>
|
||||
<h4 class="mb-0"><i class="fa-solid fa-gauge-high"></i> Overview</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
}
|
||||
|
||||
(async function(){
|
||||
await app.auth.forceLogin('app_sso_admin');
|
||||
await app.auth.forceLogin(['app_sso_admin', 'admin']);
|
||||
|
||||
$(document).ready(function(){
|
||||
renderUsers();
|
||||
|
||||
Reference in New Issue
Block a user