fix: Allow users to perform actions on own profile
This commit is contained in:
parent
7efa626b8b
commit
7a788f4c90
@ -434,6 +434,9 @@ def user_by_id(request, user_id):
|
||||
user = User.objects.get(id=user_id)
|
||||
# Only users that are mods or owners of the user are allowed to view
|
||||
fail_if_user_not_owner_or_trust_level(request.user, user)
|
||||
if user == request.user:
|
||||
return my_profile(request)
|
||||
else:
|
||||
return user_detail(request, user)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user