Add RBAC check to openEditProjectModal

Ryan Danenberg committed commite883bec3d0ccd2b07624b656bef52e84502a7b4f Browse files
1 file changed+4−0
index.html+4−0View file
@@ -4051,6 +4051,10 @@
// Modal: Edit Project
function openEditProjectModal(projectId) {
+ if (!currentUser || currentUser.role !== 'admin') {
+ showToast('Access Denied', 'Administrator permissions required.', 'error');
+ return;
+ }
const p = state.projects.find(x => x._id === projectId);
if (!p) return;
document.getElementById('edit-project-id').value = p._id;