manager: remind OU in user consent breadcrumb (#47238)
This commit is contained in:
parent
69ec66052f
commit
9c00b35242
|
@ -10,6 +10,9 @@
|
|||
{% block breadcrumb %}
|
||||
{{ block.super }}
|
||||
<a href="{% url 'a2-manager-users' %}">{% trans 'Users' %}</a>
|
||||
{% if multiple_ou and object.ou %}
|
||||
<a href="../?search-ou={{ object.ou.pk }}">{{ object.ou }}</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'a2-manager-user-detail' pk=object.pk %}">{{ object.get_full_name }}</a>
|
||||
<a href="#">{% trans "Consent Management" context "manager" %}</a>
|
||||
{% endblock %}
|
||||
|
|
|
@ -421,8 +421,8 @@ class TableHookMixin(object):
|
|||
return table
|
||||
|
||||
|
||||
class BaseTableView(TitleMixin, TableHookMixin, FormatsContextData, ModelNameMixin, PermissionMixin,
|
||||
SearchFormMixin, FilterQuerysetByPermMixin, TableQuerysetMixin,
|
||||
class BaseTableView(MultipleOUMixin, TitleMixin, TableHookMixin, FormatsContextData, ModelNameMixin,
|
||||
PermissionMixin, SearchFormMixin, FilterQuerysetByPermMixin, TableQuerysetMixin,
|
||||
SingleTableView):
|
||||
'''Base class for views showing a table of objects'''
|
||||
pass
|
||||
|
|
|
@ -932,3 +932,18 @@ def test_manager_user_authorizations(app, superuser, simple_user):
|
|||
resp = resp.follow()
|
||||
assert resp.html.find('td').text == \
|
||||
'This user has not granted profile data access to any service yet.'
|
||||
|
||||
def test_manager_user_authorizations_breadcrumb(app, superuser, simple_user):
|
||||
resp = login(app, superuser)
|
||||
user_authorizations_url = reverse(
|
||||
'a2-manager-user-authorizations', kwargs={'pk': simple_user.id})
|
||||
resp = app.get(user_authorizations_url, status=200)
|
||||
assert [x.text for x in resp.html.find('span', {'id': 'breadcrumb'}).find_all('a')] == [
|
||||
'Homepage', 'Administration', 'Users', 'Default organizational unit',
|
||||
'Jôhn Dôe', 'Consent Management']
|
||||
user_authorizations_url = reverse(
|
||||
'a2-manager-user-authorizations', kwargs={'pk': superuser.id})
|
||||
resp = app.get(user_authorizations_url, status=200)
|
||||
assert [x.text for x in resp.html.find('span', {'id': 'breadcrumb'}).find_all('a')] == [
|
||||
'Homepage', 'Administration', 'Users',
|
||||
'super user', 'Consent Management']
|
||||
|
|
Loading…
Reference in New Issue