Commit 99d2649b authored by Michal Čihař's avatar Michal Čihař

Block demo server password change

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 46c1aa84
......@@ -141,7 +141,7 @@ def user_profile(request):
if appsettings.DEMO_SERVER and request.user.username == 'demo':
messages.warning(
request,
_('You can not change demo profile on the demo server.')
_('You can not change demo account on the demo server.')
)
return redirect('profile')
......@@ -217,7 +217,7 @@ def user_remove(request):
if appsettings.DEMO_SERVER and request.user.username == 'demo':
messages.warning(
request,
_('You can not change demo profile on the demo server.')
_('You can not change demo account on the demo server.')
)
return redirect('profile')
......@@ -457,6 +457,12 @@ def password(request):
'''
Password change / set form.
'''
if appsettings.DEMO_SERVER and request.user.username == 'demo':
messages.warning(
request,
_('You can not change demo account on the demo server.')
)
return redirect('profile')
do_change = False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment