You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2020/09/14 15:27:56 UTC

[allura] branch kt/4069 created (now f8e8e17)

This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a change to branch kt/4069
in repository https://gitbox.apache.org/repos/asf/allura.git.


      at f8e8e17  [#4069] Disallow removal of anon read access from projects when nbhd prevents private projects

This branch includes the following new commits:

     new f8e8e17  [#4069] Disallow removal of anon read access from projects when nbhd prevents private projects

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[allura] 01/01: [#4069] Disallow removal of anon read access from projects when nbhd prevents private projects

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch kt/4069
in repository https://gitbox.apache.org/repos/asf/allura.git

commit f8e8e17999e6f5335b48f75528acf49eacc35080
Author: Kenton Taylor <kt...@slashdotmedia.com>
AuthorDate: Mon Sep 14 15:27:00 2020 +0000

    [#4069] Disallow removal of anon read access from projects when nbhd prevents private projects
---
 Allura/allura/ext/admin/templates/project_groups.html | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Allura/allura/ext/admin/templates/project_groups.html b/Allura/allura/ext/admin/templates/project_groups.html
index f468245..ca6b6f5 100644
--- a/Allura/allura/ext/admin/templates/project_groups.html
+++ b/Allura/allura/ext/admin/templates/project_groups.html
@@ -26,14 +26,18 @@
 
 {% block header %}User Permissions{% endblock %}
 
+{% set private_projects = c.project.neighborhood.features.get('private_projects') %}
+
 {% macro show_perms_for_role(role) %}
   <ul class="permissions">
     {% for perm in permissions_by_role[role._id.__str__()] %}
+    {% if private_projects or (not private_projects 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>
 {% endmacro %}