LG-12018: Refactor account deletion/message to be variable#9927
LG-12018: Refactor account deletion/message to be variable#9927
Conversation
changelog: Internal, account deletion, make account deletion period a variable
2f80ef3 to
af1055b
Compare
82220ff to
eaa8372
Compare
03e4b1b to
002dc06
Compare
aa62842 to
d208f5e
Compare
| def show | ||
| analytics.account_reset_visit | ||
| presenter = ConfirmationEmailPresenter.new(current_user, view_context) | ||
| @confirmation_period = presenter.confirmation_period |
There was a problem hiding this comment.
Account reset should use the period from IdentityStore.config.account_reset_wait_period_days, not Devise.confirm_within?
There was a problem hiding this comment.
The way I understood this, this should use account_reset_wait_period_days because this is for after the account reset is sent which could vary based on what the user sets.
aduth
left a comment
There was a problem hiding this comment.
These changes look good to me.
I noticed there is one more instance of "24 hours" that we need to replace for this ticket. I'll leave it to you if you want to handle that here, or merge this as-is and create a follow-on pull request.
identity-idp/config/locales/account_reset/en.yml
Lines 33 to 34 in 21d5b41
| </table> | ||
|
|
||
| <p> | ||
| <%= t('user_mailer.email_confirmation_instructions.footer', confirmation_period: '24 hours') %> |
There was a problem hiding this comment.
One other nice effect of this that occurs to me is that this would have been untranslated content, which is now fixed.
You can see "24 hours" in the Spanish version of the current template, for example.
I'll handle that change here. I do not see a reason why it should be a separate ticket. |
That's fine. I wasn't suggesting another ticket though, just another pull request if it'd be easier to separate the code changes that way. |
🤦🏾♀️ I read "pull request" as "ticket." |
🎫 Ticket
LG-12018: Refactor account deletion/message to be variable
🛠 Summary of changes
This PR supports future efforts where the waiting period of a deletion account can be a variable.
📜 Testing Plan
N/A because this is an internal change