Update display of PPoC and remove option to edit PPoC perms

This commit is contained in:
leigh-mil 2020-01-15 13:49:08 -05:00
parent 5036504ae2
commit 0c733dd365
2 changed files with 74 additions and 66 deletions

View File

@ -42,7 +42,9 @@ def filter_members_data(members_list):
members_data = []
for member in members_list:
permission_sets = filter_perm_sets_data(member)
ppoc = PermissionSets.PORTFOLIO_POC in member.permission_sets
ppoc = (
PermissionSets.get(PermissionSets.PORTFOLIO_POC) in member.permission_sets
)
member_data = {
"role_id": member.id,
"user_name": member.user_name,

View File

@ -9,6 +9,7 @@
{% if user_can(permissions.EDIT_PORTFOLIO_USERS) -%}
{% for member in members -%}
{% if not member.ppoc -%}
{% set invite_pending = member.status == 'invite_pending' %}
{% set invite_expired = member.status == 'invite_expired' %}
@ -87,6 +88,7 @@
</div>
{% endcall %}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- endif %}
@ -130,7 +132,11 @@
{%-endfor %}
{% if user_can(permissions.EDIT_PORTFOLIO_USERS) -%}
{% call ToggleMenu() %}
<a v-on:click="openModal('{{ perms_modal }}')">Edit Permissions</a>
<a
{% if not member.ppoc %}v-on:click="openModal('{{ perms_modal }}')"{% endif %}
class="{% if member.ppoc %}disabled{% endif %}">
Edit Permissions
</a>
{% if invite_pending or invite_expired -%}
<a v-on:click="openModal('{{ resend_invite_modal }}')">Resend Invite</a>
<a v-on:click="openModal('{{ revoke_invite_modal }}')">Revoke Invite</a>