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
0c5bae5e
Commit
0c5bae5e
authored
Dec 17, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce diff with CE in Projects::GroupLinksController
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
c531b2ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
app/controllers/projects/group_links_controller.rb
app/controllers/projects/group_links_controller.rb
+2
-5
ee/app/controllers/ee/projects/group_links_controller.rb
ee/app/controllers/ee/projects/group_links_controller.rb
+19
-0
No files found.
app/controllers/projects/group_links_controller.rb
View file @
0c5bae5e
...
...
@@ -4,7 +4,6 @@ class Projects::GroupLinksController < Projects::ApplicationController
layout
'project_settings'
before_action
:authorize_admin_project!
before_action
:authorize_admin_project_member!
,
only:
[
:update
]
before_action
:authorize_group_share!
,
only:
[
:create
]
def
index
redirect_to
namespace_project_settings_members_path
...
...
@@ -45,10 +44,6 @@ class Projects::GroupLinksController < Projects::ApplicationController
protected
def
authorize_group_share!
access_denied!
unless
project
.
allowed_to_share_with_group?
end
def
group_link_params
params
.
require
(
:group_link
).
permit
(
:group_access
,
:expires_at
)
end
...
...
@@ -57,3 +52,5 @@ class Projects::GroupLinksController < Projects::ApplicationController
params
.
permit
(
:link_group_access
,
:expires_at
)
end
end
Projects
::
GroupLinksController
.
prepend
(
::
EE
::
Projects
::
GroupLinksController
)
ee/app/controllers/ee/projects/group_links_controller.rb
0 → 100644
View file @
0c5bae5e
# frozen_string_literal: true
module
EE
module
Projects
module
GroupLinksController
extend
ActiveSupport
::
Concern
prepended
do
before_action
:authorize_group_share!
,
only:
[
:create
]
end
protected
def
authorize_group_share!
access_denied!
unless
project
.
allowed_to_share_with_group?
end
end
end
end
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