[MAGNOLIA-6617] Rescue user created by RescueSecuritySupport has no powers on users workspace Created: 30/Mar/16  Updated: 09/Dec/16  Resolved: 04/Nov/16

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 5.4.10, 5.5

Type: Bug Priority: Major
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: troubleshooting
Remaining Estimate: 0d
Time Spent: 3h
Original Estimate: Not Specified

Issue Links:
Git Code Review
git code review opened MGNLUI-4067 ItemNotFoundException when using Resc... Closed
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:
Sprint: Basel 68
Story Points: 2

 Description   

To reproduce

No hint on the UI that something went wrong but looking in the logs one can see

2016-03-30 10:37:01,579 ERROR info.magnolia.cms.security.JCRSessionOp           : Failed to execute info.magnolia.cms.security.MgnlUserManager$1@57a38fd0 session operation with info.magnolia.cms.security.RescueSecuritySupport$RescueUser cannot be cast to info.magnolia.cms.security.MgnlUser
java.lang.ClassCastException: info.magnolia.cms.security.RescueSecuritySupport$RescueUser cannot be cast to info.magnolia.cms.security.MgnlUser
	at info.magnolia.cms.security.MgnlUserManager$1.doExec(MgnlUserManager.java:138)
	at info.magnolia.cms.security.MgnlUserManager$1.doExec(MgnlUserManager.java:134)
	at info.magnolia.cms.security.SilentSessionOp.exec(SilentSessionOp.java:70)
	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:392)
	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:377)
	at info.magnolia.cms.security.MgnlUserManager.setProperty(MgnlUserManager.java:134)
	at info.magnolia.security.app.dialog.action.SaveUserDialogAction.createOrUpdateUser(SaveUserDialogAction.java:179)
	at info.magnolia.security.app.dialog.action.SaveUserDialogAction.execute(SaveUserDialogAction.java:97)

And no changes were persisted, of course.

------
Solution
All users returned by the RescueSecurityManager must be the actual ones coming from the users workspace, except superuser who is the in-memory, temporary RescueUser needed to access AdminCentral and fix the configuration.



 Comments   
Comment by Christopher Zimmermann [ 27/Sep/16 ]

Users are having trouble because of this: https://forums.magnolia-cms.com/forum/thread.html?threadId=3de2f2e9-26e3-4a2a-bcbe-73b63ac3b84e&page=1

Comment by Christopher Zimmermann [ 27/Sep/16 ]

Comments on this page: https://documentation.magnolia-cms.com/display/WIKI/Rescue+Security+Support

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