manager: add display condition on homepage sidebar title (#87961)
gitea/authentic/pipeline/head This commit looks good
Details
gitea/authentic/pipeline/head This commit looks good
Details
This commit is contained in:
parent
0334e56117
commit
95701c5e76
|
@ -32,7 +32,9 @@
|
|||
|
||||
{% block sidebar %}
|
||||
<aside id="sidebar">
|
||||
<h3>{% blocktrans %}Configuration & technical information{% endblocktrans %}</h3>
|
||||
{% if sidebar_entries %}
|
||||
<h3>{% blocktrans %}Configuration & technical information{% endblocktrans %}</h3>
|
||||
{% endif %}
|
||||
<div class="a2-manager-id-tools_content">
|
||||
{% for entry in sidebar_entries %}
|
||||
<a id="{{ entry.slug }}" class="button button-paragraph" href="{{ entry.href }}">{{ entry.label }}</a>
|
||||
|
|
|
@ -926,6 +926,17 @@ def test_manager_homepage_import_export_hidden(admin, app):
|
|||
assert 'site-export' not in manager_home_page.text
|
||||
|
||||
|
||||
def test_manager_homepage_sidebar_title(app, simple_user, admin):
|
||||
user_admin_role = Role.objects.get(slug='_a2-manager-of-users')
|
||||
simple_user.roles.add(user_admin_role)
|
||||
manager_homepage = login(app, simple_user, reverse('a2-manager-homepage'))
|
||||
assert 'Configuration & technical information' not in manager_homepage
|
||||
logout(app)
|
||||
|
||||
manager_homepage = login(app, admin, reverse('a2-manager-homepage'))
|
||||
assert 'Configuration & technical information' in manager_homepage
|
||||
|
||||
|
||||
def test_manager_ou(app, superuser_or_admin, ou1):
|
||||
manager_home_page = login(app, superuser_or_admin, reverse('a2-manager-homepage'))
|
||||
ou_homepage = manager_home_page.click(href='organizational-units')
|
||||
|
|
Loading…
Reference in New Issue