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
9f72d4e6
Commit
9f72d4e6
authored
Jun 26, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move EE only codes to their EE modules
parent
e258cf31
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
13 deletions
+15
-13
app/models/audit_event.rb
app/models/audit_event.rb
+0
-1
app/models/lfs_object.rb
app/models/lfs_object.rb
+0
-1
app/models/namespace.rb
app/models/namespace.rb
+0
-11
ee/app/models/ee/audit_event.rb
ee/app/models/ee/audit_event.rb
+2
-0
ee/app/models/ee/lfs_object.rb
ee/app/models/ee/lfs_object.rb
+1
-0
ee/app/models/ee/namespace.rb
ee/app/models/ee/namespace.rb
+12
-0
No files found.
app/models/audit_event.rb
View file @
9f72d4e6
class
AuditEvent
<
ActiveRecord
::
Base
prepend
EE
::
AuditEvent
include
Gitlab
::
Utils
::
StrongMemoize
serialize
:details
,
Hash
# rubocop:disable Cop/ActiveRecordSerialize
...
...
app/models/lfs_object.rb
View file @
9f72d4e6
...
...
@@ -7,7 +7,6 @@ class LfsObject < ActiveRecord::Base
has_many
:projects
,
through: :lfs_objects_projects
scope
:with_files_stored_locally
,
->
{
where
(
file_store:
[
nil
,
LfsObjectUploader
::
Store
::
LOCAL
])
}
scope
:with_files_stored_remotely
,
->
{
where
(
file_store:
LfsObjectUploader
::
Store
::
REMOTE
)
}
validates
:oid
,
presence:
true
,
uniqueness:
true
...
...
app/models/namespace.rb
View file @
9f72d4e6
...
...
@@ -52,7 +52,6 @@ class Namespace < ActiveRecord::Base
after_commit
:refresh_access_of_projects_invited_groups
,
on: :update
,
if:
->
{
previous_changes
.
key?
(
'share_with_group_lock'
)
}
before_create
:sync_share_with_group_lock_with_parent
before_create
:sync_membership_lock_with_parent
before_update
:sync_share_with_group_lock_with_parent
,
if: :parent_changed?
after_update
:force_share_with_group_lock_on_descendants
,
if:
->
{
share_with_group_lock_changed?
&&
share_with_group_lock?
}
...
...
@@ -164,10 +163,6 @@ class Namespace < ActiveRecord::Base
Gitlab
.
config
.
lfs
.
enabled
end
def
actual_size_limit
Gitlab
::
CurrentSettings
.
repository_size_limit
end
def
shared_runners_enabled?
projects
.
with_shared_runners
.
any?
end
...
...
@@ -297,12 +292,6 @@ class Namespace < ActiveRecord::Base
end
end
def
sync_membership_lock_with_parent
if
parent
&
.
membership_lock?
self
.
membership_lock
=
true
end
end
def
force_share_with_group_lock_on_descendants
return
unless
Group
.
supports_nested_groups?
...
...
ee/app/models/ee/audit_event.rb
View file @
9f72d4e6
module
EE
module
AuditEvent
extend
ActiveSupport
::
Concern
extend
::
Gitlab
::
Utils
::
Override
override
:author_name
def
author_name
details
[
:author_name
].
presence
||
user
&
.
name
end
...
...
ee/app/models/ee/lfs_object.rb
View file @
9f72d4e6
...
...
@@ -10,6 +10,7 @@ module EE
after_destroy
:log_geo_event
scope
:geo_syncable
,
->
{
with_files_stored_locally
}
scope
:with_files_stored_remotely
,
->
{
where
(
file_store:
LfsObjectUploader
::
Store
::
REMOTE
)
}
end
private
...
...
ee/app/models/ee/namespace.rb
View file @
9f72d4e6
...
...
@@ -37,6 +37,8 @@ module EE
validate
:validate_plan_name
validate
:validate_shared_runner_minutes_support
before_create
:sync_membership_lock_with_parent
end
module
ClassMethods
...
...
@@ -102,6 +104,16 @@ module EE
actual_plan
&
.
name
||
FREE_PLAN
end
def
actual_size_limit
::
Gitlab
::
CurrentSettings
.
repository_size_limit
end
def
sync_membership_lock_with_parent
if
parent
&
.
membership_lock?
self
.
membership_lock
=
true
end
end
def
shared_runner_minutes_supported?
if
has_parent?
!
Feature
.
enabled?
(
:shared_runner_minutes_on_root_namespace
)
...
...
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