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
db9a8965
Commit
db9a8965
authored
Jul 10, 2020
by
Giorgenes Gelatti
Committed by
Heinrich Lee Yu
Jul 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move preload of ip_restrictions in project to EE
parent
09773394
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
app/models/project.rb
app/models/project.rb
+4
-5
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+5
-0
No files found.
app/models/project.rb
View file @
db9a8965
...
@@ -522,11 +522,6 @@ class Project < ApplicationRecord
...
@@ -522,11 +522,6 @@ class Project < ApplicationRecord
.
where
(
project_pages_metadata:
{
project_id:
nil
})
.
where
(
project_pages_metadata:
{
project_id:
nil
})
end
end
scope
:with_api_entity_associations
,
->
{
preload
(
:project_feature
,
:route
,
:tags
,
group:
[
:ip_restrictions
,
:saml_provider
],
namespace:
[
:route
,
:owner
])
}
scope
:with_api_commit_entity_associations
,
->
{
scope
:with_api_commit_entity_associations
,
->
{
preload
(
:project_feature
,
:route
,
namespace:
[
:route
,
:owner
])
preload
(
:project_feature
,
:route
,
namespace:
[
:route
,
:owner
])
}
}
...
@@ -545,6 +540,10 @@ class Project < ApplicationRecord
...
@@ -545,6 +540,10 @@ class Project < ApplicationRecord
# Used by Projects::CleanupService to hold a map of rewritten object IDs
# Used by Projects::CleanupService to hold a map of rewritten object IDs
mount_uploader
:bfg_object_map
,
AttachmentUploader
mount_uploader
:bfg_object_map
,
AttachmentUploader
def
self
.
with_api_entity_associations
preload
(
:project_feature
,
:route
,
:tags
,
:group
,
namespace:
[
:route
,
:owner
])
end
def
self
.
with_web_entity_associations
def
self
.
with_web_entity_associations
preload
(
:project_feature
,
:route
,
:creator
,
:group
,
namespace:
[
:route
,
:owner
])
preload
(
:project_feature
,
:route
,
:creator
,
:group
,
namespace:
[
:route
,
:owner
])
end
end
...
...
ee/app/models/ee/project.rb
View file @
db9a8965
...
@@ -204,6 +204,11 @@ module EE
...
@@ -204,6 +204,11 @@ module EE
def
with_web_entity_associations
def
with_web_entity_associations
super
.
preload
(
:compliance_framework_setting
)
super
.
preload
(
:compliance_framework_setting
)
end
end
override
:with_api_entity_associations
def
with_api_entity_associations
super
.
preload
(
group:
[
:ip_restrictions
,
:saml_provider
])
end
end
end
def
has_regulated_settings?
def
has_regulated_settings?
...
...
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