Skip to content
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

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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
@@ -113,11 +113,12 @@ public async Task<CityMembersDto> RenewFormerMemberUserAsync(UserRenewalDto user
var cityId = userRenewal.CityId;
var user = await _userManager.FindByIdAsync(userId);

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