Database and application chrome is offered to an allowlisted structure user on Harper 5.3, where the list gates its DDL
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- authorization, frontend
Direzione di ricerca
Start with src/hooks/usePermissions.ts, src/hooks/checkOperationPermission.ts, and the permission gates for the database tree, table and schema views, dialogs, and application editor. Read how useAllowlistVersion resolves GrantBand and how allowlistGatesEveryPath applies across Harper versions. Update each surface's visibility checks to match the operations it invokes; verify that restricted actions are hidden while permitted actions remain available on both sides of the 5.3 behavior change.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
useInstanceBrowseManagePermission (src/hooks/usePermissions.ts) is true for any role with structure_user: true. The Databases tree and its context menus, the Delete Table and Delete Database modals, the table view, the schema editor and the application editor's actions all gate on it.
From Harper v5.3.0-alpha.1, verifyPerms checks the role's operations allowlist before its structure-user returns (utility/operation_authorization.ts at v5.3.0: the gate at line 773, the structure-user returns at 805 and 810). Through 5.2.x those returns come first. So on 5.3, a structure user whose allowlist leaves out drop_table, create_table, drop_database and the rest still sees those actions. Harper then refuses them with Operation '<name>' is not permitted for this role's operations configuration, in some cases after the user has confirmed a destructive dialog. I checked this against Harper's own verifyPerms on 5.2.3 (allowed), 5.3.0-beta.2 and 5.3.1 (denied).
The hook can't see the instance version. If it denied by the allowlist without the version, it would hide DDL that works on 5.2. #1885's PR leaves the hook as it is and says why in a comment.
The application-editor half of the hook (set_component_file, drop_component, deploy_component, set_env_value, restart_service) has a related, older gap. Those operations aren't structure-user operations, so a structure user can run them only if its allowlist lists them, and that holds on every version. A structure user with no allowlist, or a list that leaves them out, sees that chrome and gets a 403.
Harper is still the authority, so this is a UI mismatch, not a privilege escalation.
Suggested fix
Split the one boolean into checks for each surface: drop_table for Delete Table, drop_database for Delete Database, create_table/create_attribute for the schema editor, and the application-editor operations for that half. Resolve the instance's GrantBand (useAllowlistVersion) so a structure user's DDL is checked against the list only where allowlistGatesEveryPath(band) holds. checkAnyOperationAllowed in src/hooks/checkOperationPermission.ts already matches the gate's expansion.
🤖 Generated by Claude Code (Claude Opus); posted via @dawsontoth.
- Lingua principale
- TypeScript
- Stelle
- 5
- Fork
- 4
- Merge medio
- 1g 20h
- PR unite (30g)
- 140
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di HarperFast/studio
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
HarperFast/studio#2070 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
HarperFast/studio#2067 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
HarperFast/studio#2053 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
HarperFast/studio#2026 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
HarperFast/studio#2021 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di HarperFast/studio
Issue simili
-
fehler
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Azure/azure-functions-nodejs-extensions#180 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
laaielichter/Threesmith#28 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 2 giorni
-
iso-bmff: add IsoBoxReadView.readUint64 and IsoBoxWriteView.writeUint64 for exact 64-bit fieldsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
streaming-video-technology-alliance/common-media-library#611 ·
I maintainer di solito rispondono entro 1 giorno