Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4adc65f0
Commit
4adc65f0
authored
Sep 01, 2021
by
Doug Stull
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant helper from project members index
- logic is duplicate and not necessary.
parent
78c3c417
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
app/helpers/invite_members_helper.rb
app/helpers/invite_members_helper.rb
+0
-8
app/views/projects/project_members/index.html.haml
app/views/projects/project_members/index.html.haml
+1
-1
No files found.
app/helpers/invite_members_helper.rb
View file @
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
...
...
app/views/projects/project_members/index.html.haml
View file @
4adc65f0
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment