Modal scroll fix; per-account editor/viewer roles

- Fix account settings modal overflow: add max-height to .modal, make
  .modal-body flex/scrollable, widen #acct-settings-modal to 620px
- Add role column to user_accounts (editor|viewer) with migration;
  existing assignments promoted to editor
- New isEditorForAccount() in auth middleware for per-account write checks
- Replace global requireEditor with per-account checks in checks.js,
  deposits.js, pdf.js, deposit-pdf.js, qbo-import.js
- GET /api/accounts now returns user_role per account
- users.js returns {account_id, role} per assignment; POST/PUT accept
  accounts as [{id, role}]
- Frontend: state.accountRole tracks effective role for active account;
  applyRoleUI and renderRow use it; user management shows role dropdown
  per account assignment
This commit is contained in:
2026-03-18 23:31:23 -06:00
parent 764def4f7d
commit af88549ad8
12 changed files with 137 additions and 41 deletions
+7
View File
@@ -421,6 +421,7 @@ td {
transform: translate(-50%, -48%);
width: 480px;
max-width: calc(100vw - 2rem);
max-height: calc(100vh - 40px);
background: var(--surface);
border-radius: 6px;
box-shadow: 0 8px 32px rgba(0,0,0,0.2);
@@ -454,6 +455,9 @@ td {
display: flex;
flex-direction: column;
gap: 12px;
flex: 1;
min-height: 0;
overflow-y: auto;
}
.modal-desc {
@@ -598,6 +602,9 @@ input[type="file"] {
border-radius: 3px;
padding: 3px;
}
#acct-settings-modal {
width: min(620px, calc(100vw - 2rem));
}
#acct-settings-modal .modal-body {
max-height: calc(100vh - 160px);
overflow-y: auto;