Skip to content

Commit

Permalink
Prune old, unreachable code and images
Browse files Browse the repository at this point in the history
- Removes old, unreachable "custom header image" logic which was
  replaced with custom logo upload feature
- Remove old, 0.3 era backup script and backup variable from staging.yml
- Remove old logo images and AppArmor whitelisting rules for them

Resolves #5347
  • Loading branch information
eloquence committed Jul 30, 2020
1 parent 3e746ae commit 82b4476
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 125 deletions.
9 changes: 0 additions & 9 deletions install_files/ansible-base/group_vars/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@ enable_ssh_over_tor: false
# v3 onion services should be available in staging for testing.
v3_onion_services: true

### Use for backup restores ###
# If the `backup_zip` variable is defined ansible will copy the defined file to
# the app server and run the 0.3_collect.py script to unzip and restore those
# files.
# ex: backup_zip: "sd-backup-2015-01-15--21-03-32.zip"
# To use uncomment the following line and enter the correct decrypted zip
# filename between the quotes.
#backup_zip: ""

install_local_packages: true

# Don't install app-code package from the FPF apt repo, since we want to run
Expand Down
81 changes: 0 additions & 81 deletions install_files/ansible-base/roles/backup/files/0.3_collect.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@
/var/www/securedrop/static/i/logo-footer.png r,
/var/www/securedrop/static/i/no16-global.png r,
/var/www/securedrop/static/i/no16.png r,
/var/www/securedrop/static/i/securedrop.png r,
/var/www/securedrop/static/i/securedrop_small.png r,
/var/www/securedrop/static/i/server_upload.png r,
/var/www/securedrop/static/i/star.png r,
/var/www/securedrop/static/i/success_checkmark.png r,
Expand Down
8 changes: 0 additions & 8 deletions securedrop/journalist_app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,6 @@ def _handle_http_exception(
app.jinja_env.trim_blocks = True
app.jinja_env.lstrip_blocks = True
app.jinja_env.globals['version'] = version.__version__
if hasattr(config, 'CUSTOM_HEADER_IMAGE'):
app.jinja_env.globals['header_image'] = \
config.CUSTOM_HEADER_IMAGE # type: ignore
app.jinja_env.globals['use_custom_header_image'] = True
else:
app.jinja_env.globals['header_image'] = 'logo.png'
app.jinja_env.globals['use_custom_header_image'] = False

app.jinja_env.filters['rel_datetime_format'] = \
template_filters.rel_datetime_format
app.jinja_env.filters['filesizeformat'] = template_filters.filesizeformat
Expand Down
5 changes: 0 additions & 5 deletions securedrop/journalist_templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
<div id="header">
<a href="{{ url_for('main.index') }}" class="no-bottom-border"><img src="{{ url_for('main.select_logo') }}" class="logo small" alt="SecureDrop" width="250"></a>
{% include 'locales.html' %}
{% if use_custom_header_image %}
<div class="powered">
{{ gettext('Powered by <br> <img src="/static/i/securedrop_small.png" alt="SecureDrop">') }}
</div>
{% endif %}
</div>
{% endblock %}

Expand Down
8 changes: 0 additions & 8 deletions securedrop/source_app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,6 @@ def handle_csrf_error(e):
app.jinja_env.globals['version'] = version.__version__
# Exported to source templates for being included in instructions
app.jinja_env.globals['submission_key_fpr'] = config.JOURNALIST_KEY
if getattr(config, 'CUSTOM_HEADER_IMAGE', None):
app.jinja_env.globals['header_image'] = \
config.CUSTOM_HEADER_IMAGE # type: ignore
app.jinja_env.globals['use_custom_header_image'] = True
else:
app.jinja_env.globals['header_image'] = 'logo.png'
app.jinja_env.globals['use_custom_header_image'] = False

app.jinja_env.filters['rel_datetime_format'] = \
template_filters.rel_datetime_format
app.jinja_env.filters['nl2br'] = evalcontextfilter(template_filters.nl2br)
Expand Down
6 changes: 0 additions & 6 deletions securedrop/source_templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
<img src="{{ url_for('main.select_logo') }}" class="logo small" alt="{{ gettext('Logo Image') }}" width="250">
</a>
{% include 'locales.html' %}
{% if use_custom_header_image %}
<div class="powered">
{{ gettext('Powered by') }}<br>
<img src="/static/i/securedrop_small.png" alt="SecureDrop">
</div>
{% endif %}
</div>
{% endblock %}

Expand Down
6 changes: 0 additions & 6 deletions securedrop/source_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
<div class="index-wrap">
<div class="header">
<img src="{{ url_for('main.select_logo') }}" alt="{{ gettext('Logo Image') }}" class="logo-image">
{% if use_custom_header_image %}
<div class="powered">
{{ gettext('Powered by') }}<br>
<img src="/static/i/securedrop_small.png" alt="SecureDrop">
</div>
{% endif %}
<div id="index-locales">
{% include 'locales.html' %}
</div>
Expand Down
Binary file removed securedrop/static/i/securedrop.png
Binary file not shown.
Binary file removed securedrop/static/i/securedrop_small.png
Binary file not shown.

0 comments on commit 82b4476

Please sign in to comment.