Skip to content

Fix user renewals for users without former plast member role#2800

Open
vsynieok wants to merge 3 commits intomasterfrom
fix-user-renewal
Open

Fix user renewals for users without former plast member role#2800
vsynieok wants to merge 3 commits intomasterfrom
fix-user-renewal

Conversation

@vsynieok
Copy link
Contributor

@vsynieok vsynieok commented Sep 6, 2022

Closes #2772

@vsynieok vsynieok requested review from a team September 6, 2022 09:47
@vsynieok vsynieok self-assigned this Sep 6, 2022

if (!await _userManager.IsInRoleAsync(user, Roles.FormerPlastMember))
throw new ArgumentException("User is not Former-Member", nameof(userRenewal));
if (await _userManager.IsInRoleAsync(user, Roles.FormerPlastMember))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throw наверняка подразумевал, что начиная с 122 строки дальше код выполняться не будет.
Твои изменения безопасны?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[User renewals] Super admin can't renew a user

4 participants