-
Bug
-
Resolution: Fixed
-
Critical
-
5.5.14
-
None
-
None
-
-
Empty show more show less
-
AdminX 21
-
1
Steps to reproduce
- Â Use an instance which has SSO-3.0.0 installed
- Â Configure SSO module to map email attribute from the openID
- Â Check that when Mail modules tries to send an email it fails throwing an UnsoportedOperationException
Expected results
The email is properly retrieved from the external user and the email is sent
Actual results
UnsoportedOperationException is thrown
Workaround
N/A
Development notes
When the MailVerifyPresenter class (method sendSimpleMail) tries to send the email, it fails because it does't check it the user is MgnlUser or an ExternalUser:
MailVerifyPresenter.java
String userEmailAddress = PropertyUtil.getString(SessionUtil.getNodeByIdentifier(RepositoryConstants.USERS, MgnlContext.getUser().getIdentifier()), PROPERTY_EMAIL);
Discovery
Regarding this specific problem, in fact the user email can be retrieved using MgnlContext.getUser().getProperty("email") which is a generic way for both MgnlUser and ExternalUser
Notes: Apply the same fix for both methods MailVerifyPresenter#sendSimpleMail and MailVerifyPresenter#sendTemplateMail (source code)
Acceptance criteria
1.
|
Implementation | Completed | Nguyen Phung Chi | |
2.
|
Review | Completed | Evzen Fochr | |
3.
|
PiQA | Closed | Unassigned | |
4.
|
Final QA | Completed | Nguyen Phung Chi |