forked from Github-Mirrors/canaille
Display TOS and policy URI on the consent list page
This commit is contained in:
parent
896e9cca03
commit
a96518ef9c
4 changed files with 27 additions and 0 deletions
|
@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
|
||||
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
|
||||
|
||||
Added
|
||||
*****
|
||||
|
||||
- Display TOS and policy URI on the consent list page. :pr:`99`
|
||||
|
||||
Fixed
|
||||
*****
|
||||
|
||||
|
|
|
@ -58,6 +58,22 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if client.tos_uri or client.policy_uri %}
|
||||
<div class="extra content">
|
||||
{% if client.policy_uri %}
|
||||
<span class="right floated">
|
||||
<i class="mask icon"></i>
|
||||
<a href="{{ client.policy_uri }}">{% trans %}Policy{% endtrans %}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if client.tos_uri %}
|
||||
<span>
|
||||
<i class="file signature icon"></i>
|
||||
<a href="{{ client.tos_uri }}">{% trans %}Terms of service{% endtrans %}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<a class="ui bottom attached button" href="{{ url_for('oidc.consents.delete', consent_id=consent.cn[0] ) }}">
|
||||
<i class="remove icon"></i>
|
||||
{% trans %}Remove access{% endtrans %}
|
||||
|
|
|
@ -31,6 +31,8 @@ def create_app():
|
|||
)
|
||||
|
||||
@app.route("/")
|
||||
@app.route("/tos")
|
||||
@app.route("/policy")
|
||||
def index():
|
||||
return render_template(
|
||||
"index.html", user=session.get("user"), name=app.config["NAME"]
|
||||
|
|
|
@ -7,6 +7,8 @@ oauthClientContact: admin@mydomain.tld
|
|||
oauthClientURI: http://localhost:5001
|
||||
oauthRedirectURIs: http://localhost:5001/authorize
|
||||
oauthPostLogoutRedirectURI: http://localhost:5001/
|
||||
oauthTermsOfServiceURI: http://localhost:5001/tos
|
||||
oauthPolicyURI: http://localhost:5001/policy
|
||||
oauthGrantType: authorization_code
|
||||
oauthGrantType: refresh_token
|
||||
oauthScope: openid
|
||||
|
@ -29,6 +31,8 @@ oauthClientContact: admin@mydomain.tld
|
|||
oauthClientURI: http://localhost:5002
|
||||
oauthRedirectURIs: http://localhost:5002/authorize
|
||||
oauthPostLogoutRedirectURI: http://localhost:5002/
|
||||
oauthTermsOfServiceURI: http://localhost:5002/tos
|
||||
oauthPolicyURI: http://localhost:5002/policy
|
||||
oauthGrantType: authorization_code
|
||||
oauthGrantType: refresh_token
|
||||
oauthScope: openid
|
||||
|
|
Loading…
Reference in a new issue