[MAGNOLIA-8282] Bootstrapped role cannot be assigned right after in startup tasks Created: 20/Jan/22  Updated: 05/Sep/22  Resolved: 03/Feb/22

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 6.3.0
Fix Version/s: 6.3.0, Tech Prod Ready

Type: Bug Priority: Neutral
Reporter: Evzen Fochr Assignee: Evzen Fochr
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLSSO-92 Infinite redirection loop after "Conn... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Epic Link: Update backend of Security app (Norsu)
Sprint: AdminX 2, AdminX 3
Story Points: 3
Team: AdminX

 Description   

Steps to reproduce

  1.  add startuptasks that boostrap role and try to assign it to group
  2.  

.. Logs, screenshots, gifs...

Expected results

role is bootstraped and assigned

.. Justify non-trivial expectations with a link to a doc or a relevant discussion.

Actual results

role is bootstraped but not visible for assigment task. Assigment task warns that role doesn't exist and do nothing.

Workaround

run startup phase twice

Development notes

Probably caused by different phase,. In install/update phase it works.
See info.magnolia.cms.security.RepositoryBackedSecurityManager#findPrincipalNode(java.lang.String, javax.jcr.Session, java.lang.String, javax.jcr.Node)
We need stable mechanism to update saas instance. Startuptasks are just temporary solution that can be replaced with better one.



 Comments   
Comment by Matt Rajkovic [ 20/Jan/22 ]

Added "adminx" label until we decide which team should address this issue. Feel free to remove later. 

Comment by Roman Kovařík [ 24/Jan/22 ]

efochr Could you try to add to the condition
Components.getComponent(InstallContextImpl.class).getCurrentModuleDefinition() == null
?

Comment by Evzen Fochr [ 02/Feb/22 ]

Not working, needs investigation.

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