This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a commit to branch gc/8573
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/gc/8573 by this push:
new 4062fce00 fixup! fixup! [#8573] hide admin/update/create permissions
for authorized and anonymous users
4062fce00 is described below
commit 4062fce00a0bbcd274f447f083de482ab3a64df9
Author: Guillermo Cruz <[email protected]>
AuthorDate: Wed Jan 15 10:14:45 2025 -0700
fixup! fixup! [#8573] hide admin/update/create permissions for authorized
and anonymous users
---
Allura/allura/ext/admin/templates/project_groups.html | 6 ++++++
Allura/allura/tests/functional/test_admin.py | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Allura/allura/ext/admin/templates/project_groups.html
b/Allura/allura/ext/admin/templates/project_groups.html
index 49b7e51b6..341b91e54 100644
--- a/Allura/allura/ext/admin/templates/project_groups.html
+++ b/Allura/allura/ext/admin/templates/project_groups.html
@@ -38,6 +38,12 @@
{{perm['name']}}
</a> {# close tag, opened by render #}
</li>
+ {% elif private_projects and not display_perms and perm['name'] ==
'read' %}
+ <li class="{{perm['has']}}" data-permission="{{perm['name']}}">
+ {{ g.icons['perm_has_%s'%perm['has']].render(title=perm['text'],
closing_tag=False) }}
+ {{perm['name']}}
+ </a> {# close tag, opened by render #}
+ </li>
{% endif %}
{% endfor %}
</ul>
diff --git a/Allura/allura/tests/functional/test_admin.py
b/Allura/allura/tests/functional/test_admin.py
index b43b421e0..23b8301f0 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -1029,9 +1029,9 @@ class TestProjectAdmin(TestController):
group_name = gr.select_one('td').text.strip()
group_perms = gr.find('ul', {'class': 'permissions'}).findAll('li')
if group_name not in ['Authenticated', 'Anonymous']:
- assert len(group_perms) == 4 # read permission is being
displayed
+ assert len(group_perms) == 4 # read permission is being
displayed
else:
- assert len(group_perms) == 0
+ assert len(group_perms) == 1