diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-05-15 17:37:48 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-05-15 17:37:48 +0200 |
commit | ed1cc0c3944aa27fd889b24beae0b6bebb80241d (patch) | |
tree | 7488afcc850a4ef24b7db5e969bd9a28056f08c9 | |
parent | Typo. (diff) | |
download | newspipe-ed1cc0c3944aa27fd889b24beae0b6bebb80241d.tar.gz newspipe-ed1cc0c3944aa27fd889b24beae0b6bebb80241d.tar.bz2 newspipe-ed1cc0c3944aa27fd889b24beae0b6bebb80241d.zip |
Fix.
-rw-r--r-- | pyaggr3g470r/templates/admin/dashboard.html | 4 | ||||
-rw-r--r-- | pyaggr3g470r/views.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pyaggr3g470r/templates/admin/dashboard.html b/pyaggr3g470r/templates/admin/dashboard.html index 1d9194e0..d40ffdf5 100644 --- a/pyaggr3g470r/templates/admin/dashboard.html +++ b/pyaggr3g470r/templates/admin/dashboard.html @@ -24,9 +24,9 @@ <a href="/admin/user/{{ user.id }}/"><i class="glyphicon glyphicon-user" title="{{ _('View this user') }}<"></i></a> <a href="/admin/edit_user/{{ user.id }}/"><i class="glyphicon glyphicon-edit" title="{{ _('Edit this user') }}"></i></a> {% if user.activation_key == "" %} - <a href="/admin/enable_user/{{ user.id }}/"><i class="glyphicon glyphicon-ban-circle" title="Disable this account"></i></a> + <a href="/admin/disable_user/{{ user.id }}/"><i class="glyphicon glyphicon-ban-circle" title="Disable this account"></i></a> {% else %} - <a href="/admin/disable_user/{{ user.id }}/"><i class="glyphicon glyphicon-ok-circle" title="Enable this account"></i></a> + <a href="/admin/enable_user/{{ user.id }}/"><i class="glyphicon glyphicon-ok-circle" title="Enable this account"></i></a> {% endif %} <a href="/admin/delete_user/{{ user.id }}/"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this user') }}" onclick="return confirm('{{ _('You are going to delete this account.') }}');"></i></a> </td> diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index a8d6da51..6fd06560 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -794,7 +794,7 @@ def disable_user(user_id=None): flash('Account of the user "' + user.nickname + '" successfully activated.', 'success') else: import random, base64, hashlib - user.apikey = base64.b64encode(hashlib.sha512( str(random.getrandbits(256)) ).digest(), + user.activation_key = base64.b64encode(hashlib.sha512( str(random.getrandbits(256)) ).digest(), random.choice(['rA','aZ','gQ','hH','hG','aR','DD'])).rstrip('==') flash('Account of the user "' + user.nickname + '" successfully disabled.', 'success') db.session.commit() |