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
9b67b920
Commit
9b67b920
authored
May 18, 2018
by
Chantal Rollison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract EE specific files, closes 5942
parent
5d538054
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
16 deletions
+53
-16
app/controllers/concerns/issuable_actions.rb
app/controllers/concerns/issuable_actions.rb
+18
-14
app/controllers/concerns/issuable_collections.rb
app/controllers/concerns/issuable_collections.rb
+1
-2
ee/app/controllers/concerns/ee/issuable_actions.rb
ee/app/controllers/concerns/ee/issuable_actions.rb
+15
-0
ee/app/controllers/concerns/ee/issuable_collections.rb
ee/app/controllers/concerns/ee/issuable_collections.rb
+16
-0
ee/changelogs/unreleased/ccr-extract-EE-specific-files.yml
ee/changelogs/unreleased/ccr-extract-EE-specific-files.yml
+3
-0
No files found.
app/controllers/concerns/issuable_actions.rb
View file @
9b67b920
module
IssuableActions
prepend
EE
::
IssuableActions
extend
ActiveSupport
::
Concern
included
do
...
...
@@ -7,6 +8,19 @@ module IssuableActions
before_action
:authorize_admin_issuable!
,
only: :bulk_update
end
def
permitted_keys
[
:issuable_ids
,
:assignee_id
,
:milestone_id
,
:state_event
,
:subscription_event
,
label_ids:
[],
add_label_ids:
[],
remove_label_ids:
[]
]
end
def
show
respond_to
do
|
format
|
format
.
html
...
...
@@ -140,25 +154,15 @@ module IssuableActions
end
def
bulk_update_params
permitted_keys
=
[
:issuable_ids
,
:assignee_id
,
:milestone_id
,
:state_event
,
:subscription_event
,
:weight
,
label_ids:
[],
add_label_ids:
[],
remove_label_ids:
[]
]
permitted_keys_array
=
permitted_keys
.
dup
if
resource_name
==
'issue'
permitted_keys
<<
{
assignee_ids:
[]
}
permitted_keys
_array
<<
{
assignee_ids:
[]
}
else
permitted_keys
.
unshift
(
:assignee_id
)
permitted_keys
_array
.
unshift
(
:assignee_id
)
end
params
.
require
(
:update
).
permit
(
permitted_keys
)
params
.
require
(
:update
).
permit
(
permitted_keys
_array
)
end
def
resource_name
...
...
app/controllers/concerns/issuable_collections.rb
View file @
9b67b920
module
IssuableCollections
prepend
EE
::
IssuableCollections
extend
ActiveSupport
::
Concern
include
SortingHelper
include
Gitlab
::
IssuableMetadata
...
...
@@ -140,8 +141,6 @@ module IssuableCollections
when
'milestone_due_desc'
then
sort_value_milestone
when
'downvotes_asc'
then
sort_value_popularity
when
'downvotes_desc'
then
sort_value_popularity
when
'weight_asc'
then
sort_value_weight
when
'weight_desc'
then
sort_value_weight
else
value
end
end
...
...
ee/app/controllers/concerns/ee/issuable_actions.rb
0 → 100644
View file @
9b67b920
module
EE
module
IssuableActions
extend
ActiveSupport
::
Concern
extend
::
Gitlab
::
Utils
::
Override
EE_PERMITTED_KEYS
=
%w[
weight
]
.
freeze
override
:permitted_keys
def
permitted_keys
@permitted_keys
||=
(
super
+
EE_PERMITTED_KEYS
).
freeze
end
end
end
ee/app/controllers/concerns/ee/issuable_collections.rb
0 → 100644
View file @
9b67b920
module
EE
module
IssuableCollections
extend
ActiveSupport
::
Concern
extend
::
Gitlab
::
Utils
::
Override
# Update old values to the actual ones.
override
:update_cookie_value
def
update_cookie_value
(
value
)
if
value
==
'weight_asc'
||
value
==
'weight_desc'
sort_value_weight
else
super
end
end
end
end
ee/changelogs/unreleased/ccr-extract-EE-specific-files.yml
0 → 100644
View file @
9b67b920
title
:
Extract EE specific files
merge_request
:
!5771
type
:
added
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