diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-11-13 21:41:24 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-11-13 21:41:24 +0100 |
commit | 2f5424febbc1e12b6abf29f5e0259d4b8c17d2aa (patch) | |
tree | dada79f00267fce1ad974bb0c9a52a243b4855b7 /src/web/views | |
parent | Format the date. (diff) | |
download | newspipe-2f5424febbc1e12b6abf29f5e0259d4b8c17d2aa.tar.gz newspipe-2f5424febbc1e12b6abf29f5e0259d4b8c17d2aa.tar.bz2 newspipe-2f5424febbc1e12b6abf29f5e0259d4b8c17d2aa.zip |
Various improvements for the public pages and the private profile edition page.
Diffstat (limited to 'src/web/views')
-rw-r--r-- | src/web/views/user.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/web/views/user.py b/src/web/views/user.py index 21427d3c..91cf7e4a 100644 --- a/src/web/views/user.py +++ b/src/web/views/user.py @@ -27,7 +27,9 @@ def profile_public(nickname=None): user_contr = UserController() user = user_contr.get(nickname=nickname) if not user.is_public_profile: - return redirect(url_for('home')) + if current_user.is_authenticated and current_user.id == user.id: + flash('You must set your profile to public.', 'info') + return redirect(url_for('user.profile')) filters = {} filters['private'] = False |