Skip to content

Commit

Permalink
#931: TODOs in UserAuthorizationService implementiert
Browse files Browse the repository at this point in the history
  • Loading branch information
clean-coder committed Aug 6, 2024
1 parent da13e29 commit 4f98384
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,22 @@ public List<User> createUsers(List<User> userList) {
}

public boolean isUserMemberOfTeams(long id) {
// TODO check Role
List<UserTeam> userTeamList = userBusinessService.getUserById(id).getUserTeamList();
return userTeamList != null && !userTeamList.isEmpty();
}

public boolean isUserOwnerOfKeyResults(long id) {
// TODO check Role
return keyResultBusinessService.isUserOwnerOfKeyResults(id);
}

public void deleteEntityById(long id) {
// TODO check Role
AuthorizationService.checkRoleWriteAndReadAll(authorizationService.updateOrAddAuthorizationUser(),
OkrResponseStatusException.of(ErrorKey.NOT_AUTHORIZED_TO_DELETE, USER));

userBusinessService.deleteEntityById(id);
}

public UserOkrDataDto getUserOkrData(long id) {
// TODO check Role
List<KeyResult> keyResultsOwnedByUser = keyResultBusinessService.getKeyResultsOwnedByUser(id);
return new UserOkrDataMapper().toDto(keyResultsOwnedByUser);
}
Expand Down

0 comments on commit 4f98384

Please sign in to comment.