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
c07aac51
Commit
c07aac51
authored
Feb 12, 2021
by
Aakriti Gupta
Committed by
Michael Kozono
Feb 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove maintenance mode feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]
parent
dd6ec7c3
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
23 deletions
+11
-23
config/feature_flags/development/maintenance_mode.yml
config/feature_flags/development/maintenance_mode.yml
+0
-8
ee/app/controllers/ee/admin/application_settings_controller.rb
...p/controllers/ee/admin/application_settings_controller.rb
+1
-1
ee/app/views/admin/application_settings/_maintenance_mode_settings_form.html.haml
...cation_settings/_maintenance_mode_settings_form.html.haml
+1
-1
ee/changelogs/unreleased/ag-remove-maintenance-mode-ff-yml.yml
...angelogs/unreleased/ag-remove-maintenance-mode-ff-yml.yml
+5
-0
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
ee/spec/views/admin/application_settings/general.html.haml_spec.rb
...iews/admin/application_settings/general.html.haml_spec.rb
+1
-9
lib/gitlab.rb
lib/gitlab.rb
+0
-1
No files found.
config/feature_flags/development/maintenance_mode.yml
deleted
100644 → 0
View file @
dd6ec7c3
---
name
:
maintenance_mode
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28158
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/217895
milestone
:
'
12.10'
type
:
development
group
:
group::geo
default_enabled
:
false
ee/app/controllers/ee/admin/application_settings_controller.rb
View file @
c07aac51
...
@@ -57,7 +57,7 @@ module EE
...
@@ -57,7 +57,7 @@ module EE
attrs
+=
EE
::
ApplicationSettingsHelper
.
merge_request_appovers_rules_attributes
attrs
+=
EE
::
ApplicationSettingsHelper
.
merge_request_appovers_rules_attributes
end
end
if
::
Gitlab
::
Geo
.
license_allows?
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
if
::
Gitlab
::
Geo
.
license_allows?
attrs
<<
:maintenance_mode
attrs
<<
:maintenance_mode
attrs
<<
:maintenance_mode_message
attrs
<<
:maintenance_mode_message
end
end
...
...
ee/app/views/admin/application_settings/_maintenance_mode_settings_form.html.haml
View file @
c07aac51
-
return
unless
::
Gitlab
::
Geo
.
license_allows?
&&
Feature
.
enabled?
(
:maintenance_mode
)
-
return
unless
::
Gitlab
::
Geo
.
license_allows?
%section
.settings.no-animate
#js-maintenance-mode-toggle
{
class:
(
'expanded'
if
expanded_by_default?
)
}
%section
.settings.no-animate
#js-maintenance-mode-toggle
{
class:
(
'expanded'
if
expanded_by_default?
)
}
.settings-header
.settings-header
...
...
ee/changelogs/unreleased/ag-remove-maintenance-mode-ff-yml.yml
0 → 100644
View file @
c07aac51
---
title
:
Release maintenance mode
merge_request
:
53895
author
:
type
:
added
ee/lib/ee/api/entities/application_setting.rb
View file @
c07aac51
...
@@ -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?
(
:package_forwarding
)
}
expose
:npm_package_requests_forwarding
,
if:
->
(
_instance
,
_opts
)
{
::
License
.
feature_available?
(
:package_forwarding
)
}
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
)
{
::
Gitlab
::
Geo
.
license_allows?
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
}
expose
:maintenance_mode
,
if:
->
(
_instance
,
_opts
)
{
::
Gitlab
::
Geo
.
license_allows?
}
expose
:maintenance_mode_message
,
if:
->
(
_instance
,
_opts
)
{
::
Gitlab
::
Geo
.
license_allows?
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
}
expose
:maintenance_mode_message
,
if:
->
(
_instance
,
_opts
)
{
::
Gitlab
::
Geo
.
license_allows?
}
expose
:git_two_factor_session_expiry
,
if:
->
(
_instance
,
_opts
)
{
License
.
feature_available?
(
:git_two_factor_enforcement
)
&&
::
Feature
.
enabled?
(
:two_factor_for_cli
)
}
expose
:git_two_factor_session_expiry
,
if:
->
(
_instance
,
_opts
)
{
License
.
feature_available?
(
:git_two_factor_enforcement
)
&&
::
Feature
.
enabled?
(
:two_factor_for_cli
)
}
end
end
end
end
...
...
ee/lib/ee/api/settings.rb
View file @
c07aac51
...
@@ -52,7 +52,7 @@ module EE
...
@@ -52,7 +52,7 @@ module EE
attrs
=
attrs
.
except
(
:git_two_factor_session_expiry
)
attrs
=
attrs
.
except
(
:git_two_factor_session_expiry
)
end
end
unless
::
Gitlab
::
Geo
.
license_allows?
&&
::
Feature
.
enabled?
(
:maintenance_mode
)
unless
::
Gitlab
::
Geo
.
license_allows?
attrs
=
attrs
.
except
(
:maintenance_mode
,
:maintenance_mode_message
)
attrs
=
attrs
.
except
(
:maintenance_mode
,
:maintenance_mode_message
)
end
end
...
...
ee/spec/views/admin/application_settings/general.html.haml_spec.rb
View file @
c07aac51
...
@@ -30,18 +30,10 @@ RSpec.describe 'admin/application_settings/general.html.haml' do
...
@@ -30,18 +30,10 @@ RSpec.describe 'admin/application_settings/general.html.haml' do
end
end
end
end
context
'when
maintenance_mode feature is enabled
'
do
context
'when
license allows
'
do
it
'shows the Maintenance mode section'
do
it
'shows the Maintenance mode section'
do
expect
(
rendered
).
to
have_css
(
'#js-maintenance-mode-toggle'
)
expect
(
rendered
).
to
have_css
(
'#js-maintenance-mode-toggle'
)
end
end
end
end
context
'when maintenance_mode feature is disabled'
do
let
(
:maintenance_mode_flag
)
{
false
}
it
'does not show the Maintenance mode section'
do
expect
(
rendered
).
not_to
have_css
(
'#js-maintenance-mode-toggle'
)
end
end
end
end
end
end
lib/gitlab.rb
View file @
c07aac51
...
@@ -121,7 +121,6 @@ module Gitlab
...
@@ -121,7 +121,6 @@ module Gitlab
end
end
def
self
.
maintenance_mode?
def
self
.
maintenance_mode?
return
false
unless
::
Feature
.
enabled?
(
:maintenance_mode
)
return
false
unless
::
Gitlab
::
CurrentSettings
.
current_application_settings?
return
false
unless
::
Gitlab
::
CurrentSettings
.
current_application_settings?
::
Gitlab
::
CurrentSettings
.
maintenance_mode
::
Gitlab
::
CurrentSettings
.
maintenance_mode
...
...
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