-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LG-15248: Account Management no change available #11701
base: main
Are you sure you want to change the base?
Conversation
…ailable if partner shares all emails
85db79e
to
884b507
Compare
@@ -16,7 +18,15 @@ def show | |||
sp_name: decorated_sp_session.sp_name, | |||
user: current_user, | |||
locked_for_session: pii_locked_for_session?(current_user), | |||
change_email_available: change_email_available?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me, part of the benefit of having a presenter like this is to help keep controllers lean by moving the logic into the presenter class, but in this case we're using the presenter as a pass-through and having the logic in the controller.
Instead, I might have expected that we could pass a value which is more readily available (decorated_sp_session.requested_attributes
or decorated_sp_session
) and do the logic in the presenter.
) | ||
end | ||
|
||
def change_email_available? | ||
if decorated_sp_session.requested_attributes.present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be looking at the requested attribute for the current request, not for each connected application. We want the link to be available for any connection where the requested attribute includes email.
<strong> | ||
<%= identity.email_address&.email || t('account.connected_apps.email_not_selected') %> | ||
</strong> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also don't want to show the "selected" email if the connected application didn't request email.
From the ticket:
"No email selected" / selected email [...] are not shown
🎫 Ticket
Link to the relevant ticket:
LG-15248
🛠 Summary of changes
On the connected accounts screen, the "change" option is not shown when
all_emails
is arequested_attribute
; oremail
does not exist onrequested attribute
📜 Testing Plan
Before testing: Clone, setup, and start the identity-oidc-sinatra app and set
feature_select_email_to_share_enabled
totrue
Default behavior:
identity-oidc-sinatra
app, leave all options checked inrequested_attributes
identity-idp
app, follow all steps to create a new account/account
page. ClickYour connected accounts
on the left side of the pageSimulating missing
email
or presentall_emails
attributeidentity-oidc-sinatra
app, either uncheckemail
or uncheckemail
and checkall_emails
identity-idp
app, follow all steps to create a new account/account
page. ClickYour connected accounts
on the left side of the page👀 Screenshots
If relevant, include a screenshot or screen capture of the changes.
When `email` is requested attribute
Screen.Recording.2025-01-08.at.1.46.46.PM.mov
When `all_emails` is a requested attribute
all.emails.no.change.link.mov
When `email` are not a requested attribute
https://github.com/user-attachments/assets/0f3b9cfe-ed76-48ca-8bc9-23e650bec4ea