From ecbfb8cd55ac718f75787817f6fdb833234e6a57 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 8 May 2021 18:24:48 +0300 Subject: Simplified account edit authorization --- ExamTemplate/Services/UserService.cs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'ExamTemplate/Services') diff --git a/ExamTemplate/Services/UserService.cs b/ExamTemplate/Services/UserService.cs index e78443a..2f137a1 100644 --- a/ExamTemplate/Services/UserService.cs +++ b/ExamTemplate/Services/UserService.cs @@ -81,12 +81,5 @@ namespace ExamTemplate.Services { return this._signInManager.IsSignedIn(claimsPrincipal); } - - public async Task IsAuthorizedToModify(ClaimsPrincipal claimsPrincipal, string username) - { - User user = await this._userManager.GetUserAsync(claimsPrincipal); - - return user.UserName == username || await this._userManager.IsInRoleAsync(user, "Administrator"); - } } } -- cgit v1.2.3