-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
04c4906
commit 464d65d
Showing
4 changed files
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
{% block content %} | ||
<div class="container theme-showcase py-5" role="main"> | ||
{% if current_user and current_user.is_authenticated %} | ||
{% if image and not current_user.is_disabled %} | ||
{% if image and not current_user.disabled_at and not current_user_disabled_by %} | ||
<div class="row"> | ||
<div class="text-center"> | ||
<h1> | ||
|
@@ -160,7 +160,7 @@ <h2> | |
</div> | ||
</div> | ||
</div> | ||
{% elif current_user.is_disabled %} | ||
{% elif current_user.disabled_at and current_user.disabled_by %} | ||
<h3>Your account has been disabled due to too many incorrect classifications/tags!</h3> | ||
<p> | ||
<a href="mailto:[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
{% block content %} | ||
<div class="container theme-showcase py-5" role="main"> | ||
{% if current_user and current_user.is_authenticated %} | ||
{% if image and current_user.is_disabled == False %} | ||
{% if image and not user.disabled_at and not user.disabled_by %} | ||
<div class="row"> | ||
<div class="text-center"> | ||
<h1> | ||
|
@@ -70,7 +70,7 @@ <h1> | |
<img class="img-responsive" src="{{ path }}" alt="Picture to be sorted"> | ||
</div> | ||
</div> | ||
{% elif current_user.is_disabled == True %} | ||
{% elif user.disabled_at and user.disabled_by %} | ||
<h3>Your account has been disabled due to too many incorrect classifications/tags!</h3> | ||
<p> | ||
<a href="mailto:[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -379,7 +379,9 @@ def test_user_can_get_email_reset_token_sent_with_password(client, session, fake | |
def test_user_can_change_email_with_valid_reset_token(client, session): | ||
with current_app.test_request_context(): | ||
login_user(client) | ||
user = User.query.filter_by(is_administrator=False, is_disabled=False).first() | ||
user = User.query.filter_by( | ||
is_administrator=False, disabled_at=None, disabled_by=None | ||
).first() | ||
token = user.generate_email_change_token("[email protected]") | ||
|
||
rv = client.get( | ||
|