0001-home-remove-franceconnect-menu-entry-71958.patch
MANIFEST.in | ||
---|---|---|
2 | 2 |
recursive-include hobo/templates *.html *.txt |
3 | 3 |
recursive-include hobo/applications/templates *.html *.txt |
4 | 4 |
recursive-include hobo/debug/templates *.html *.txt |
5 |
recursive-include hobo/franceconnect/templates *.html *.txt |
|
6 | 5 |
recursive-include hobo/profile/templates *.html *.txt |
7 | 6 |
recursive-include hobo/seo/templates *.html *.txt |
8 | 7 |
recursive-include hobo/theme/templates *.html *.txt |
hobo/franceconnect/templates/hobo/franceconnect_home.html | ||
---|---|---|
1 |
{% extends "hobo/base.html" %} |
|
2 |
{% load i18n %} |
|
3 | ||
4 |
{% block breadcrumb %} |
|
5 |
{{ block.super }} |
|
6 |
<a href="{% url 'franceconnect-home' %}">FranceConnect</a> |
|
7 |
{% endblock %} |
|
8 | ||
9 |
{% block appbar %} |
|
10 |
<h2>{% trans 'FranceConnect' %}</h2> |
|
11 |
{% endblock %} |
|
12 | ||
13 |
{% block content %} |
|
14 | ||
15 |
<div class="pk-information"> |
|
16 |
<p> |
|
17 |
{% trans "FranceConnect configuration screen has been moved next to other authentication methods." %} |
|
18 |
</p> |
|
19 |
<p> |
|
20 |
<a class="pk-button" href="{{ idp_url }}manage/authenticators/">{% trans "Go to authentication methods configuration screen" %}</a> |
|
21 |
</p> |
|
22 |
</div> |
|
23 | ||
24 |
{% endblock %} |
hobo/franceconnect/urls.py | ||
---|---|---|
1 |
# hobo - portal to configure and deploy applications |
|
2 |
# Copyright (C) 2015-2019 Entr'ouvert |
|
3 |
# |
|
4 |
# This program is free software: you can redistribute it and/or modify it |
|
5 |
# under the terms of the GNU Affero General Public License as published |
|
6 |
# by the Free Software Foundation, either version 3 of the License, or |
|
7 |
# (at your option) any later version. |
|
8 |
# |
|
9 |
# This program is distributed in the hope that it will be useful, |
|
10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
# GNU Affero General Public License for more details. |
|
13 |
# |
|
14 |
# You should have received a copy of the GNU Affero General Public License |
|
15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | ||
17 |
from django.urls import path |
|
18 | ||
19 |
from . import views |
|
20 | ||
21 |
urlpatterns = [ |
|
22 |
path('', views.home, name='franceconnect-home'), |
|
23 |
] |
hobo/franceconnect/views.py | ||
---|---|---|
1 |
# hobo - portal to configure and deploy applications |
|
2 |
# Copyright (C) 2015-2019 Entr'ouvert |
|
3 |
# |
|
4 |
# This program is free software: you can redistribute it and/or modify it |
|
5 |
# under the terms of the GNU Affero General Public License as published |
|
6 |
# by the Free Software Foundation, either version 3 of the License, or |
|
7 |
# (at your option) any later version. |
|
8 |
# |
|
9 |
# This program is distributed in the hope that it will be useful, |
|
10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
# GNU Affero General Public License for more details. |
|
13 |
# |
|
14 |
# You should have received a copy of the GNU Affero General Public License |
|
15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | ||
17 |
from django.views.generic import TemplateView |
|
18 | ||
19 | ||
20 |
class HomeView(TemplateView): |
|
21 |
template_name = 'hobo/franceconnect_home.html' |
|
22 | ||
23 | ||
24 |
home = HomeView.as_view() |
hobo/settings.py | ||
---|---|---|
46 | 46 |
'hobo.applications', |
47 | 47 |
'hobo.debug', |
48 | 48 |
'hobo.environment', |
49 |
'hobo.franceconnect', |
|
50 | 49 |
'hobo.maintenance', |
51 | 50 |
'hobo.matomo', |
52 | 51 |
'hobo.profile', |
hobo/templates/hobo/home.html | ||
---|---|---|
111 | 111 |
{% endif %} |
112 | 112 |
</a> |
113 | 113 |
<a class="button button-paragraph" href="{% url 'sms-home' %}">{% trans 'SMS' %}</a> |
114 |
{% if has_authentic %} |
|
115 |
<a class="button button-paragraph" href="{% url 'franceconnect-home' %}">FranceConnect</a> |
|
116 |
{% endif %} |
|
117 | 114 |
<a class="button button-paragraph" href="{% url 'matomo-home' %}">{% trans 'User tracking' %}</a> |
118 | 115 |
<a class="button button-paragraph" href="{% url 'seo-home' %}">{% trans 'Indexing' %}</a> |
119 | 116 |
<a class="button button-paragraph" href="{% url 'environment-home' %}">{% trans 'Services' %}</a> |
hobo/urls.py | ||
---|---|---|
22 | 22 |
from .debug.urls import urlpatterns as debug_urls |
23 | 23 |
from .emails.urls import urlpatterns as emails_urls |
24 | 24 |
from .environment.urls import urlpatterns as environment_urls |
25 |
from .franceconnect.urls import urlpatterns as franceconnect_urls |
|
26 | 25 |
from .maintenance.urls import urlpatterns as maintenance_urls |
27 | 26 |
from .matomo.urls import urlpatterns as matomo_urls |
28 | 27 |
from .profile.urls import urlpatterns as profile_urls |
... | ... | |
38 | 37 |
path('', home, name='home'), |
39 | 38 |
re_path(r'^sites/', decorated_includes(admin_required, include(environment_urls))), |
40 | 39 |
re_path(r'^profile/', decorated_includes(admin_required, include(profile_urls))), |
41 |
re_path(r'^franceconnect/', decorated_includes(admin_required, include(franceconnect_urls))), |
|
42 | 40 |
re_path(r'^visits-tracking/', decorated_includes(admin_required, include(matomo_urls))), |
43 | 41 |
re_path(r'^theme/', decorated_includes(admin_required, include(theme_urls))), |
44 | 42 |
re_path(r'^emails/', decorated_includes(admin_required, include(emails_urls))), |
tests/test_home_views.py | ||
---|---|---|
21 | 21 |
resp = app.get('/') |
22 | 22 |
assert resp.html.find('h1').text == 'System' |
23 | 23 |
assert resp.html.find('h2').text == 'System' |
24 |
assert 'franceconnect' not in resp.html |
|
25 |
app.get('/franceconnect/', status=404) |
|
24 | 26 | |
25 | 27 | |
26 | 28 |
def test_home_view_with_normal_user(app, user): |
27 |
- |