diff --git a/exercise.wwwapi/Endpoints/UserEndpoints.cs b/exercise.wwwapi/Endpoints/UserEndpoints.cs index e3107d9..9e73ba7 100644 --- a/exercise.wwwapi/Endpoints/UserEndpoints.cs +++ b/exercise.wwwapi/Endpoints/UserEndpoints.cs @@ -340,8 +340,7 @@ public static async Task UpdateUser(IRepository userRepository, i { // Only teacher can edit protected fields var authorized = AuthorizeTeacher(claimsPrinciple); - if (!authorized && (request is not null - || request.Role is not null)) + if (!authorized && (request.Role is not null)) { return Results.Unauthorized(); }