Commit f9651eae authored by Thong Kuah's avatar Thong Kuah

Merge branch '332057-reconcile-partials-for-invite-trigger-and-modal' into 'master'

Simplify project members index partial

See merge request gitlab-org/gitlab!69393
parents 88e2febd 4adc65f0
......@@ -9,14 +9,6 @@ module InviteMembersHelper
Feature.enabled?(:invite_members_group_modal, project.group) && can?(current_user, :admin_project_member, project)
end
def can_invite_group_for_project?(project)
# do not use the can_admin_project_member? helper here due to structure of the view and how membership_locked?
# is leveraged for inviting groups
Feature.enabled?(:invite_members_group_modal, project.group) &&
can?(current_user, :admin_project_member, project) &&
project.allowed_to_share_with_group?
end
def invite_accepted_notice(member)
case member.source
when Project
......
......@@ -3,7 +3,7 @@
.row.gl-mt-3
.col-lg-12
- if can_invite_members_for_project?(@project) || can_invite_group_for_project?(@project)
- if can_invite_members_for_project?(@project)
.row
.col-md-12.col-lg-6.gl-display-flex
.gl-flex-direction-column.gl-flex-wrap.align-items-baseline
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment