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
4a3dc4a5
Commit
4a3dc4a5
authored
Jul 15, 2020
by
Gabriel Mazetto
Committed by
Ash McKenzie
Jul 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `Gitlab::Geo.license_allows?` instead of checking license manually
parent
c232c440
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
ee/app/controllers/ee/admin/application_settings_controller.rb
...p/controllers/ee/admin/application_settings_controller.rb
+1
-1
ee/lib/ee/api/entities/application_setting.rb
ee/lib/ee/api/entities/application_setting.rb
+2
-2
ee/lib/ee/api/settings.rb
ee/lib/ee/api/settings.rb
+1
-1
No files found.
ee/app/controllers/ee/admin/application_settings_controller.rb
View file @
4a3dc4a5
...
@@ -55,7 +55,7 @@ module EE
...
@@ -55,7 +55,7 @@ module EE
attrs
<<
{
compliance_frameworks:
[]
}
attrs
<<
{
compliance_frameworks:
[]
}
end
end
if
::
License
.
feature_available?
(
:geo
)
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
if
::
Gitlab
::
Geo
.
license_allows?
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
attrs
<<
:maintenance_mode
attrs
<<
:maintenance_mode
attrs
<<
:maintenance_mode_message
attrs
<<
:maintenance_mode_message
end
end
...
...
ee/lib/ee/api/entities/application_setting.rb
View file @
4a3dc4a5
...
@@ -20,8 +20,8 @@ module EE
...
@@ -20,8 +20,8 @@ module EE
expose
:updating_name_disabled_for_users
,
if:
->
(
_instance
,
_opts
)
{
::
License
.
feature_available?
(
:disable_name_update_for_users
)
}
expose
:updating_name_disabled_for_users
,
if:
->
(
_instance
,
_opts
)
{
::
License
.
feature_available?
(
:disable_name_update_for_users
)
}
expose
:npm_package_requests_forwarding
,
if:
->
(
_instance
,
_opts
)
{
::
License
.
feature_available?
(
:packages
)
}
expose
:npm_package_requests_forwarding
,
if:
->
(
_instance
,
_opts
)
{
::
License
.
feature_available?
(
:packages
)
}
expose
:group_owners_can_manage_default_branch_protection
,
if:
->
(
_instance
,
_opts
)
{
::
License
.
feature_available?
(
:default_branch_protection_restriction_in_groups
)
}
expose
:group_owners_can_manage_default_branch_protection
,
if:
->
(
_instance
,
_opts
)
{
::
License
.
feature_available?
(
:default_branch_protection_restriction_in_groups
)
}
expose
:maintenance_mode
,
if:
->
(
_instance
,
_opts
)
{
::
License
.
feature_available?
(
:geo
)
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
}
expose
:maintenance_mode
,
if:
->
(
_instance
,
_opts
)
{
::
Gitlab
::
Geo
.
license_allows?
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
}
expose
:maintenance_mode_message
,
if:
->
(
_instance
,
_opts
)
{
::
License
.
feature_available?
(
:geo
)
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
}
expose
:maintenance_mode_message
,
if:
->
(
_instance
,
_opts
)
{
::
Gitlab
::
Geo
.
license_allows?
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
}
end
end
end
end
end
end
...
...
ee/lib/ee/api/settings.rb
View file @
4a3dc4a5
...
@@ -47,7 +47,7 @@ module EE
...
@@ -47,7 +47,7 @@ module EE
attrs
=
attrs
.
except
(
:group_owners_can_manage_default_branch_protection
)
attrs
=
attrs
.
except
(
:group_owners_can_manage_default_branch_protection
)
end
end
unless
::
License
.
feature_available?
(
:geo
)
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
unless
::
Gitlab
::
Geo
.
license_allows?
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
attrs
=
attrs
.
except
(
:maintenance_mode
,
:maintenance_mode_message
)
attrs
=
attrs
.
except
(
:maintenance_mode
,
:maintenance_mode_message
)
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