fix: [website] Fixed an error when Flask was trying to find blueprints not initialized because user accounts is set to false.
Some checks are pending
CodeQL / Analyze (python) (push) Waiting to run
Deploy Jekyll with GitHub Pages dependencies preinstalled / build (push) Waiting to run
Deploy Jekyll with GitHub Pages dependencies preinstalled / deploy (push) Blocked by required conditions
Python application - MyPy / Python ${{ matrix.python-version }} sample (3.10) (push) Waiting to run
Python application - MyPy / Python ${{ matrix.python-version }} sample (3.11) (push) Waiting to run
Python application - MyPy / Python ${{ matrix.python-version }} sample (3.12) (push) Waiting to run
Python application - API Test / Python ${{ matrix.python-version }} sample (3.10) (push) Waiting to run
Python application - API Test / Python ${{ matrix.python-version }} sample (3.11) (push) Waiting to run
Python application - API Test / Python ${{ matrix.python-version }} sample (3.12) (push) Waiting to run

This commit is contained in:
Cédric Bonhomme 2024-07-25 11:44:06 +02:00
parent 15ac89202c
commit 806ae83c93
Signed by untrusted user who does not match committer: cedric
GPG key ID: A1CB94DE57B7A70D
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@
<div class="col-auto">
<input type="text" class="form-control" id="freetext_search" placeholder="What are you looking for?" name="freetext_search" list="vendors_list" autofocus>
<small class="form-text text-body-secondary">Type a vendor name or a vulnerability id.</small><br />
{% if not current_user.is_authenticated and not vendor %}
{% if config.user_accounts and not current_user.is_authenticated and not vendor %}
<small class="form-text text-body-secondary">Not yet a <a href="{{ url_for('users_bp.list_users') }}" title="Our gentle contributors.">member</a> ?
<a href="{{ url_for('user_bp.signup') }}" title="Join the platform!">Create your account</a>.</small>
{% endif %}

View file

@ -143,11 +143,11 @@ Other source: {{source}}.
<div class="row">
<div class="col">
{% if current_user.is_authenticated %}
{% if config.user_accounts and current_user.is_authenticated %}
<button id="buttonNewComment" class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#newComment{{vulnerability_id}}" aria-expanded="false" aria-controls="newComment{{vulnerability_id}}">
New comment{{ render_icon('chevron-down') }}
</button>
{% else %}
{% elif config.user_accounts %}
<p><a href="{{ url_for('user_bp.login') }}">Log in</a> or <a href="{{ url_for('user_bp.signup') }}">create an account</a> to share your comment.</p>
{% endif %}
</div>