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
ee0cd772
Commit
ee0cd772
authored
Aug 27, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove prepend_entity from EE::API::Entities
parent
c14f85fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
19 deletions
+0
-19
ee/lib/ee/api/entities.rb
ee/lib/ee/api/entities.rb
+0
-18
lib/api/entities.rb
lib/api/entities.rb
+0
-1
No files found.
ee/lib/ee/api/entities.rb
View file @
ee0cd772
...
@@ -3,24 +3,6 @@
...
@@ -3,24 +3,6 @@
module
EE
module
EE
module
API
module
API
module
Entities
module
Entities
#######################
# Entities extensions #
#######################
module
Entities
extend
ActiveSupport
::
Concern
class_methods
do
def
prepend_entity
(
klass
,
with:
nil
)
if
with
.
nil?
raise
ArgumentError
,
'You need to pass either the :with or :namespace option!'
end
klass
.
descendants
.
each
{
|
descendant
|
descendant
.
prepend
(
with
)
}
klass
.
prepend
(
with
)
end
end
end
module
EntityHelpers
module
EntityHelpers
def
can_read
(
attr
,
&
block
)
def
can_read
(
attr
,
&
block
)
->
(
obj
,
opts
)
{
Ability
.
allowed?
(
opts
[
:user
],
"read_
#{
attr
}
"
.
to_sym
,
yield
(
obj
))
}
->
(
obj
,
opts
)
{
Ability
.
allowed?
(
opts
[
:user
],
"read_
#{
attr
}
"
.
to_sym
,
yield
(
obj
))
}
...
...
lib/api/entities.rb
View file @
ee0cd772
...
@@ -1725,7 +1725,6 @@ module API
...
@@ -1725,7 +1725,6 @@ module API
end
end
# rubocop: disable Cop/InjectEnterpriseEditionModule
# rubocop: disable Cop/InjectEnterpriseEditionModule
API
::
Entities
.
prepend_if_ee
(
'EE::API::Entities::Entities'
)
::
API
::
Entities
::
ApplicationSetting
.
prepend_if_ee
(
'EE::API::Entities::ApplicationSetting'
)
::
API
::
Entities
::
ApplicationSetting
.
prepend_if_ee
(
'EE::API::Entities::ApplicationSetting'
)
::
API
::
Entities
::
Board
.
prepend_if_ee
(
'EE::API::Entities::Board'
)
::
API
::
Entities
::
Board
.
prepend_if_ee
(
'EE::API::Entities::Board'
)
::
API
::
Entities
::
Group
.
prepend_if_ee
(
'EE::API::Entities::Group'
,
with_descendants:
true
)
::
API
::
Entities
::
Group
.
prepend_if_ee
(
'EE::API::Entities::Group'
,
with_descendants:
true
)
...
...
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