[MGNLUI-3029] Roles subapp > ACLs tab - Choose dialog opens roles browser instead of workspace browser Created: 24/Jun/14  Updated: 07/Jul/14  Resolved: 07/Jul/14

Status: Closed
Project: Magnolia UI
Component/s: security app
Affects Version/s: 5.3
Fix Version/s: 5.3.1

Type: Bug Priority: Blocker
Reporter: Ruth Stocks Assignee: Eric Hechinger
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7


Attachments: PNG File security add-choose dialog.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

In Security app > Roles > Access Control Lists when you click the Choose button for any workspace, the dialog contains a list of roles instead of the selected workspace tree. See attached screenshot.



 Comments   
Comment by Mikaël Geljić [ 01/Jul/14 ]
  • WorkspaceAccessFieldFactory injects a choose dialog presenter. However, choose dialogs need to be opened within their own IoC container, so that they work with their own content connector, event bus or image provider.
  • ContentApp generally takes care of registering the correct bindings when opening a choose dialog from e.g. a link field:
    • It first creates the choose-dialog's own component provider
    • Only then it creates a new instance of ChooseDialogPresenter, using the correct bindings defined upfront.

In that case here, choose-dialog presenter is not provided through the content-app, so the specific required bindings are not used, hence contentConnector resolves to the one from the current subapp = roles.

We need to ensure the same componentProvider / bindings as in content-app here too, and instantiate the choose-dialog presenter dynamically.

Comment by Mikaël Geljić [ 07/Jul/14 ]

Side note: choose-dialog specific bindings (as registered in the new -Util class) aren't new lines of code, but were moved from the ContentApp class.
This logic is rather thoroughly tested in ContentAppTest, so ideally we should move these test cases to the -UtilTest too.

#testCreateChooseDialogComponentProvider
#testCreateComponentProviderWithImageProviderBinding
#testCreateComponentProviderWithDependentChooseDialogBindings

Comment by Daniel Lipp [ 07/Jul/14 ]

sure

Generated at Mon Feb 12 09:02:31 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.