Modify members empty state depending on permissions

This commit is contained in:
Andrew Croce 2018-08-27 14:27:21 -04:00 committed by Montana
parent 0af5b6a1b4
commit e90769fbd9

View File

@ -6,10 +6,13 @@
{% if not workspace.members %} {% if not workspace.members %}
{% set user_can_invite = user_can(permissions.ASSIGN_AND_UNASSIGN_ATAT_ROLE) %}
{{ EmptyState( {{ EmptyState(
'There are currently no members in this Workspace.', 'There are currently no members in this Workspace.',
action_label='Invite a new Member', action_label='Invite a new Member' if user_can_invite else None,
action_href='/members/new', action_href='/members/new' if user_can_invite else None,
sub_message=None if user_can_invite else 'Please contact your JEDI workspace administrator to invite new members.',
icon='avatar' icon='avatar'
) }} ) }}