Add RBAC check to handleUpdateProject

Ryan Danenberg committed commite2f12ff2ec79bbe5a2ab5c8848b7a70ba60ecd8d Browse files
1 file changed+4−0
index.html+4−0View file
@@ -4072,6 +4072,10 @@
async function handleUpdateProject(e) {
e.preventDefault();
+ if (!currentUser || currentUser.role !== 'admin') {
+ showToast('Access Denied', 'Administrator permissions required.', 'error');
+ return;
+ }
const pId = document.getElementById('edit-project-id').value;
const p = state.projects.find(x => x._id === pId);
if (!p) return;