Update index.html
1 file changed+4−0
index.html+4−0View file
| @@ -1968,6 +1968,10 @@ | ||
| } | ||
| function setAdminTab(tab) { | ||
| + if (currentUser && currentUser.role !== 'admin') { | ||
| + showToast('Access Denied', 'Only administrators have access to admin views.', 'error'); | ||
| + return; | ||
| + } | ||
| currentAdminTab = tab; | ||
| ['validation', 'projects'].forEach(t => { | ||
| const btn = document.getElementById(`a-tab-${t}`); | ||