The IDE opens for a Developer-only user with a 'Could not get export list' error dialog, because the shell polls the export list the Developer role may not read

Open Beginner friendly
#8,240 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
frontend

Research direction

Start with platform-core/ui/platform/shell.js, in the header directive's getExports() rejection handler, and check how LocaleService.onInit triggers the request. The issue gives the expected behavior: a Developer opening the IDE should not see an error dialog for the expected 403. Verify the change by opening the shell as a Developer and confirming the dialog no longer blocks the IDE.

Written by the indexing model from the issue text.

Description

Images

  • Image: dirigiblelabs/dirigible:15.1.0-java (sha256:dac354be94f21f222e88b81fd7fc6e68d9616ee7b4e12bcb1e9eef0465bd213f)
  • Reference: dirigiblelabs/dirigible:15.1.0 (sha256:449b8c948738a2bd7a4294a7bec1000a08bc1da1cd20f312f0e54383a7af325d) - same behaviour on both

Steps

  1. Create a user with only the Developer role: POST /services/security/users {"username":"dev1","password":"...","tenant":"default-tenant","roles":["<DEVELOPER role id>"]} -> 201
  2. Open /services/web/shell-ide/ in a browser as dev1.

Observed

  • The shell requests GET /services/data/export-async/ on boot -> 403 {"status":403,"error":"Forbidden","message":"Forbidden","path":"/services/data/export-async/"}
  • Console: Failed to load resource: the server responded with a status of 403 () and {data: Object, status: 403, ...}
  • A modal error alert "Could not get export list - Please check the console log for more information." covers the IDE on every shell load; perspective buttons cannot be clicked until it is closed.
  • As admin the same request answers 200 and no dialog appears.

Expected

A Developer opens the IDE without an error. The 403 is correct (export/import are ADMINISTRATOR + OPERATOR, see the HttpSecurityURIConfigurator javadoc, which also keeps the Database perspective's tools open to "the developers it was built for"), so the shell header should not poll the export list for a user who may not export, or should treat a 403 as "no exports" silently.

Where

platform-core/ui/platform/shell.js, the header directive's getExports() (called from LocaleService.onInit): its rejection handler shows dialogHub.showAlert({type: Error, title: "Could not get export list"}) for any failure, including 403.

Evidence

Screenshot of the IDE as the Developer user with the dialog over the Workbench; the request and console lines above were captured from the browser on both images.

Dominant language
Java
Stars
278
Forks
97
Avg merge
15h 33m
Merged PRs (30d)
301

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-dirigible/dirigible

All issues in eclipse-dirigible/dirigible

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.