diff --git a/backend/routes/admin.py b/backend/routes/admin.py index 4abf08a..c04a924 100644 --- a/backend/routes/admin.py +++ b/backend/routes/admin.py @@ -265,11 +265,11 @@ def remove_user_from_school(school_id, user_id): return jsonify({'deleted': True}) -# ── Scholengroep ICT beheer (superadmin) ────────────────────────────────────── +# ── Scholengroep ICT beheer ─────────────────────────────────────────────────── @admin_bp.route('/scholengroep-ict', methods=['GET']) @login_required -@superadmin_required +@scholengroep_ict_required # scholengroep_ict mag de lijst lezen; superadmin ook def list_scholengroep_ict(): users = User.query.filter_by(role='scholengroep_ict', is_active=True)\ .order_by(User.last_name).all() diff --git a/backend/templates/scholengroep_ict.html b/backend/templates/scholengroep_ict.html index 7ff32f3..fd6fa4f 100644 --- a/backend/templates/scholengroep_ict.html +++ b/backend/templates/scholengroep_ict.html @@ -128,12 +128,13 @@
-
Leerkrachten
- - {% if is_superadmin %} +

👥 Scholengroep ICT medewerkers

- + {% if is_superadmin %} + + {% endif %}

Scholengroep ICT medewerkers kunnen alle scholen en gebruikers beheren, @@ -144,7 +145,6 @@ Laden...

- {% endif %} @@ -363,8 +363,7 @@ document.addEventListener('DOMContentLoaded', async () => { document.getElementById('btnSaveJaar') && bind('btnSaveJaar', 'click', addJaar); document.getElementById('btnCancelUser') && bind('btnCancelUser', 'click', closeModal); document.getElementById('btnSaveUser') && bind('btnSaveUser', 'click', addUser); - const tasks = [loadStats(), loadSchoolsTable(), loadSchoolsGrid()]; - if (IS_SUPERADMIN) tasks.push(loadSgIct()); + const tasks = [loadStats(), loadSchoolsTable(), loadSchoolsGrid(), loadSgIct()]; await Promise.all(tasks); await loadJaren(); await loadAuditLog(); @@ -396,7 +395,7 @@ async function loadSgIct() { ${u.full_name} ${u.email} ${u.last_login ? new Date(u.last_login).toLocaleDateString('nl-BE') : 'Nog niet ingelogd'} - + ${IS_SUPERADMIN ? `` : ''} `).join(''); }