Skip to content
This repository has been archived by the owner on Sep 18, 2018. It is now read-only.

Issue 348 #419

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cred/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def visible(self, user, historical=False, deleted=False):
if not historical:
qs = qs.filter(latest=None)

qs = qs.filter(Q(group__in=usergroups)
| Q(latest__group__in=usergroups)
| Q(groups__in=usergroups)
| Q(latest__groups__in=usergroups)).distinct()
qs = qs.filter(Q(group__in=usergroups) |
Q(latest__group__in=usergroups) |
Q(groups__in=usergroups) |
Q(latest__groups__in=usergroups)).distinct()

return qs

Expand Down
3 changes: 2 additions & 1 deletion cred/templates/cred_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% load i18n %}
{% load cred_markdown %}
{% load credicons %}
{% load static from staticfiles %}

{% block title %}{{ cred.title }} - {% trans "Rattic" %}{% endblock %}

Expand Down Expand Up @@ -39,7 +40,7 @@ <h1>{% cred_icon cred.iconname %} {{ cred.title }}</h1>
<p></p>
{% endif %}
<table class="table table-striped table-bordered table-condensed">
{% if cred.url %}<tr><th>{% trans "URL" %}</th><td><a href="{{ cred.url }}">{{ cred.url }}</a></td></tr>{% endif %}
{% if cred.url %}<tr><th>{% trans "URL" %}</th><td><a href="{{ cred.url }}">{{ cred.url }}</a> <a href="{{ cred.url }}" target="_BLANK"><img class="icon_open_in_new_window" src="{% static "rattic/img/icon_open_in_new_window.png" %}"></a></td></tr>{% endif %}
<tr>
<th>{% trans "Username" %}</th>
<td id="usertd" class="rattic-copy-button">
Expand Down
4 changes: 2 additions & 2 deletions ratticweb/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def base_template_reqs(request):
'USE_LDAP_GROUPS': settings.USE_LDAP_GROUPS,
'EXPORT_ENABLED': not settings.RATTIC_DISABLE_EXPORT,
'TEMPLATE_DEBUG': settings.TEMPLATE_DEBUG,
'ALLOWPWCHANGE': not (settings.LDAP_ENABLED
and not settings.AUTH_LDAP_ALLOW_PASSWORD_CHANGE),
'ALLOWPWCHANGE': not (settings.LDAP_ENABLED and
not settings.AUTH_LDAP_ALLOW_PASSWORD_CHANGE),
'rattic_icon': 'rattic/img/rattic_icon_normal.png',
'rattic_logo': 'rattic/img/rattic_logo_normal.svg',
}
Expand Down
7 changes: 5 additions & 2 deletions ratticweb/static/rattic/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ img.biglogo {
width: auto;
}

img.icon_open_in_new_window {
width: 16px;
height: 16px;
}

.container-fluid .credit {
margin: 20px 0;
}
Expand Down Expand Up @@ -144,5 +149,3 @@ body {
.table-responsive-fifth-column tbody td:nth-child(5),
.table-responsive-fifth-column thead th:nth-child(5){display: none;}
}


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ratticweb/tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_validates_on_enter(self):
with mock.patch.object(self.storage, "validate_destination", validate_destination):
with self.storage as storage:
self.assertIs(storage, self.storage)
self.storage.validate_destination.assert_called_once()
self.storage.validate_destination.assert_called_once_with()

@mock.patch("ratticweb.management.commands.storage.S3Connection")
def test_doesnt_connect_to_s3_if_no_BACKUP_S3_BUCKET_setting(self, FakeS3Connection):
Expand Down
7 changes: 4 additions & 3 deletions requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ pycrypto>=2.6,<2.7
python-dateutil>=2.1,<2.2
python-ldap>=2.4,<2.5
python-mimeparse==0.1.4
six>=1.6,<1.7
six==1.10.0
urldecode==0.1
wsgiref==0.1.2
keepassdb==0.2.1
db_backup==0.1.3
boto==2.26.1
boto==2.38.0
lxml==3.3.3
celery>=3.1,<3.2
django-celery>=3.1,<3.2
django-celery>=3.1,<3.1.17
importlib
django-social-auth>=0.7.9
paramiko==1.15.2
kombu==3.0.26
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ nose
django_nose
nose-testconfig
selenium
pep8==1.5.0
pep8==1.6.2
pyflakes

2 changes: 2 additions & 0 deletions requirements-pip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pip>=1.5.4
setuptools>=17.1
2 changes: 1 addition & 1 deletion runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function runtest() {
}

if (( $tests_only == 0 )); then
runtest "PEP8" "pep8 --exclude=migrations,lib,static,.ropeproject --ignore=E501,E225,E128,E124 ."
runtest "PEP8" "pep8 --exclude=migrations,lib,static,.ropeproject --ignore=E501,E225,E128,E124,E402 ."
runtest "pyflakes" "./pyflakes.sh"
fi

Expand Down