mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-14 16:55:42 +00:00
Return default user avatar if not set
This commit is contained in:
parent
8aebe27aa8
commit
8dba78c474
@ -65,7 +65,7 @@ def user(user_id):
|
||||
def profile_avatar(user_id):
|
||||
user = User.query.get_or_404(user_id)
|
||||
if user.avatar is None:
|
||||
abort(404)
|
||||
return redirect(url_for('static', filename='images/default_avatar.png'))
|
||||
if not user.is_public and not (user == current_user or current_user.is_administrator()):
|
||||
abort(403)
|
||||
return send_from_directory(
|
||||
|
Loading…
Reference in New Issue
Block a user