Skip to content

Commit

Permalink
Merge pull request #289 from Hira-Ijaz/bugfix/allow-user-profile-editing
Browse files Browse the repository at this point in the history
Allow users to edit their profiles
  • Loading branch information
mfisher87 authored Mar 28, 2024
2 parents 79908bf + b59f981 commit f9520a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion usaon_benefit_tool/routes/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def get(user_id: str):
@user_bp.route('/<user_id>', methods=['POST'])
@login_required
def post(user_id: str):
forbid_except_for_roles([RoleName.ADMIN])
if user_id != current_user.id:
forbid_except_for_roles([RoleName.ADMIN])

user = db.get_or_404(User, user_id)
form = Form(request.form, obj=user)
Expand Down

0 comments on commit f9520a5

Please sign in to comment.