Compare commits

..

4 Commits

11 changed files with 61 additions and 56 deletions

View File

@ -1,5 +1,5 @@
[bumpversion] [bumpversion]
current_version = 0.8.2-beta current_version = 0.8.4-beta
tag = True tag = True
commit = True commit = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\-(?P<release>.*) parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\-(?P<release>.*)

View File

@ -16,11 +16,11 @@ jobs:
- name: Building Docker Image - name: Building Docker Image
run: docker build run: docker build
--no-cache --no-cache
-t beryju/passbook:0.8.2-beta -t beryju/passbook:0.8.4-beta
-t beryju/passbook:latest -t beryju/passbook:latest
-f Dockerfile . -f Dockerfile .
- name: Push Docker Container to Registry (versioned) - name: Push Docker Container to Registry (versioned)
run: docker push beryju/passbook:0.8.2-beta run: docker push beryju/passbook:0.8.4-beta
- name: Push Docker Container to Registry (latest) - name: Push Docker Container to Registry (latest)
run: docker push beryju/passbook:latest run: docker push beryju/passbook:latest
build-gatekeeper: build-gatekeeper:
@ -37,11 +37,11 @@ jobs:
cd gatekeeper cd gatekeeper
docker build \ docker build \
--no-cache \ --no-cache \
-t beryju/passbook-gatekeeper:0.8.2-beta \ -t beryju/passbook-gatekeeper:0.8.4-beta \
-t beryju/passbook-gatekeeper:latest \ -t beryju/passbook-gatekeeper:latest \
-f Dockerfile . -f Dockerfile .
- name: Push Docker Container to Registry (versioned) - name: Push Docker Container to Registry (versioned)
run: docker push beryju/passbook-gatekeeper:0.8.2-beta run: docker push beryju/passbook-gatekeeper:0.8.4-beta
- name: Push Docker Container to Registry (latest) - name: Push Docker Container to Registry (latest)
run: docker push beryju/passbook-gatekeeper:latest run: docker push beryju/passbook-gatekeeper:latest
build-static: build-static:
@ -66,11 +66,11 @@ jobs:
run: docker build run: docker build
--no-cache --no-cache
--network=$(docker network ls | grep github | awk '{print $1}') --network=$(docker network ls | grep github | awk '{print $1}')
-t beryju/passbook-static:0.8.2-beta -t beryju/passbook-static:0.8.4-beta
-t beryju/passbook-static:latest -t beryju/passbook-static:latest
-f static.Dockerfile . -f static.Dockerfile .
- name: Push Docker Container to Registry (versioned) - name: Push Docker Container to Registry (versioned)
run: docker push beryju/passbook-static:0.8.2-beta run: docker push beryju/passbook-static:0.8.4-beta
- name: Push Docker Container to Registry (latest) - name: Push Docker Container to Registry (latest)
run: docker push beryju/passbook-static:latest run: docker push beryju/passbook-static:latest
test-release: test-release:

View File

@ -1,6 +1,6 @@
apiVersion: v1 apiVersion: v1
appVersion: "0.8.2-beta" appVersion: "0.8.4-beta"
description: A Helm chart for passbook. description: A Helm chart for passbook.
name: passbook name: passbook
version: "0.8.2-beta" version: "0.8.4-beta"
icon: https://git.beryju.org/uploads/-/system/project/avatar/108/logo.png icon: https://git.beryju.org/uploads/-/system/project/avatar/108/logo.png

View File

@ -2,7 +2,7 @@
# This is a YAML-formatted file. # This is a YAML-formatted file.
# Declare variables to be passed into your templates. # Declare variables to be passed into your templates.
image: image:
tag: 0.8.2-beta tag: 0.8.4-beta
nameOverride: "" nameOverride: ""

View File

@ -1,2 +1,2 @@
"""passbook""" """passbook"""
__version__ = "0.8.2-beta" __version__ = "0.8.4-beta"

View File

@ -37,5 +37,7 @@ class ApplicationForm(forms.ModelForm):
labels = { labels = {
"meta_launch_url": _("Launch URL"), "meta_launch_url": _("Launch URL"),
"meta_icon_url": _("Icon URL"), "meta_icon_url": _("Icon URL"),
"meta_description": _("Description"),
"meta_publisher": _("Publisher"),
} }
help_texts = {"policies": _("Policies required to access this Application.")} help_texts = {"policies": _("Policies required to access this Application.")}

View File

@ -48,13 +48,16 @@
<!--login-pf-section--> <!--login-pf-section-->
<section class="login-pf-social-section" role="contentinfo" aria-label="Log in with third party account"> <section class="login-pf-social-section" role="contentinfo" aria-label="Log in with third party account">
<ul class="login-pf-social login-pf-social-double-col list-unstyled"> <ul class="login-pf-social login-pf-social-double-col list-unstyled">
{% for url, icon, name in sources %} {% for source in sources %}
<li class="login-pf-social-link"> <li class="login-pf-social-link">
<a href="{{ url }}"> <a href="{{ source.url }}">
{% if icon %} {% if source.icon_path %}
<img src="{% static 'img/logos/' %}{{ icon }}.svg" alt="{{ name }}"> <img src="{% static source.icon_path %}" alt="{{ source.name }}">
{% endif %} {% endif %}
{{ name }} {% if source.icon_url %}
<img src="icon_url" alt="{{ source.name }}">
{% endif %}
{{ source.name }}
</a> </a>
</li> </li>
{% endfor %} {% endfor %}

View File

@ -2,42 +2,44 @@
{% load i18n %} {% load i18n %}
{% block head %}
{{ block.super }}
<style>
img.app-icon {
max-height: 72px;
}
</style>
{% endblock %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="row row-cards-pf"> <div class="row row-cards-pf">
{% for app in applications %} {% for app in applications %}
<div class="col-xs-12 col-sm-6 col-md-3"> <div class="col-xs-12 col-sm-6 col-md-3">
<div class="card-pf card-pf-accented card-pf-aggregate-status"> <div class="card-pf card-pf-view card-pf-view-select card-pf-view-single-select">
<h2 class="card-pf-title"> <div class="card-pf-body">
<span class="fa fa-shield"></span> {{ app.name }} <div class="card-pf-top-element">
</h2> <a href="{{ app.meta_launch_url }}">
<div class="card-pf-body"> {% if not app.meta_icon_url %}
<p class="card-pf-aggregate-status-notifications"> <span class="pficon pficon-arrow card-pf-icon-circle"></span>
<span class="card-pf-aggregate-status-notification"> {% else %}
<a href="{{ app.launch_url }}" class="add" data-toggle="tooltip" data-placement="top" title="{% trans 'Open App...' %}"> <img class="app-icon card-pf-icon-circle" src="{{ app.meta_icon_url }}" alt="{% trans 'Application Icon' %}">
{% if not app.icon_url %} {% endif %}
<span class="pficon pficon-arrow"></span> </a>
{% else %} </div>
<img class="app-icon" src="{{ app.icon_url }}" alt="{% trans 'Application Icon' %}"> <h2 class="card-pf-title text-center">
{% endif %} <a href="{{ app.meta_launch_url }}">
</a> {{ app.name }}
</span> </a>
</p> </h2>
{% if app.meta_publisher %}
<div class="card-pf-items text-center">
<small>{{ app.meta_publisher }}</small>
</div>
{% endif %}
{% if app.meta_description %}
<div class="card-pf-items text-center">
<p>{{ app.meta_description }}</p>
</div>
{% endif %}
</div>
<div class="card-pf-view-checkbox">
<a href="{{ app.meta_launch_url }}"></a>
</div>
</div>
</div> </div>
</div> {% endfor %}
</div> </div>
{% empty %}
<h1>{% trans 'No Applications available.' %}</h1>
{% endfor %}
</div><!-- /row -->
</div> </div>
{% endblock %} {% endblock %}

View File

@ -183,15 +183,13 @@ class Processor:
# Read the request. # Read the request.
try: try:
self._extract_saml_request() self._extract_saml_request()
except KeyError as exc: except KeyError:
raise CannotHandleAssertion( raise CannotHandleAssertion(f"Couldn't find SAML request in user session:")
f"can't find SAML request in user session: {exc}"
) from exc
try: try:
self._decode_and_parse_request() self._decode_and_parse_request()
except Exception as exc: except Exception as exc:
raise CannotHandleAssertion(f"can't parse SAML request: {exc}") from exc raise CannotHandleAssertion(f"Couldn't parse SAML request: {exc}") from exc
self._validate_request() self._validate_request()
return True return True

View File

@ -13,7 +13,7 @@ urlpatterns = [
# This view is the endpoint a SP would redirect to, and saves data into the session # This view is the endpoint a SP would redirect to, and saves data into the session
# this is required as the process view which it redirects to might have to login first. # this is required as the process view which it redirects to might have to login first.
path( path(
"<slug:application>/login/", views.LoginProcessView.as_view(), name="saml-login" "<slug:application>/login/", views.LoginBeginView.as_view(), name="saml-login"
), ),
path( path(
"<slug:application>/login/process/", "<slug:application>/login/process/",

View File

@ -35,7 +35,7 @@ class OAuthSource(Source):
"passbook_sources_oauth:oauth-client-login", "passbook_sources_oauth:oauth-client-login",
kwargs={"source_slug": self.slug}, kwargs={"source_slug": self.slug},
), ),
icon_path=f"{self.provider_type}.svg", icon_path=f"img/logos/{self.provider_type}.svg",
name=self.name, name=self.name,
) )