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
ed01d53c
Commit
ed01d53c
authored
Feb 10, 2020
by
Alexander Oleynikov
Committed by
Imre Farkas
Feb 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate GET /admin/application_settings route
parent
070abce6
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
44 additions
and
38 deletions
+44
-38
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+2
-6
app/views/admin/dashboard/index.html.haml
app/views/admin/dashboard/index.html.haml
+4
-4
app/views/layouts/nav/sidebar/_admin.html.haml
app/views/layouts/nav/sidebar/_admin.html.haml
+3
-3
changelogs/unreleased/43659-single-path-for-general-settings.yml
...ogs/unreleased/43659-single-path-for-general-settings.yml
+5
-0
config/routes/admin.rb
config/routes/admin.rb
+5
-1
doc/administration/geo/replication/configuration.md
doc/administration/geo/replication/configuration.md
+1
-1
doc/administration/raketasks/project_import_export.md
doc/administration/raketasks/project_import_export.md
+2
-2
doc/api/settings.md
doc/api/settings.md
+1
-1
doc/development/documentation/styleguide.md
doc/development/documentation/styleguide.md
+1
-1
doc/security/password_length_limits.md
doc/security/password_length_limits.md
+1
-1
doc/security/ssh_keys_restrictions.md
doc/security/ssh_keys_restrictions.md
+1
-1
doc/security/two_factor_authentication.md
doc/security/two_factor_authentication.md
+2
-1
doc/security/user_email_confirmation.md
doc/security/user_email_confirmation.md
+1
-1
doc/user/project/settings/import_export.md
doc/user/project/settings/import_export.md
+2
-2
ee/spec/controllers/admin/application_settings_controller_spec.rb
...controllers/admin/application_settings_controller_spec.rb
+2
-2
spec/controllers/admin/application_settings_controller_spec.rb
...controllers/admin/application_settings_controller_spec.rb
+7
-7
spec/features/admin/admin_disables_git_access_protocol_spec.rb
...features/admin/admin_disables_git_access_protocol_spec.rb
+1
-1
spec/features/admin/admin_mode_spec.rb
spec/features/admin/admin_mode_spec.rb
+1
-1
spec/features/admin/admin_settings_spec.rb
spec/features/admin/admin_settings_spec.rb
+2
-2
No files found.
app/controllers/admin/application_settings_controller.rb
View file @
ed01d53c
...
...
@@ -37,10 +37,6 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
define_method
(
action
)
{
perform_update
if
submitted?
}
end
def
show
render
:general
end
def
update
perform_update
end
...
...
@@ -73,7 +69,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
RepositoryCheck
::
ClearWorker
.
perform_async
redirect_to
(
admin_application_settings_path
,
general_
admin_application_settings_path
,
notice:
_
(
'Started asynchronous removal of all repository check states.'
)
)
end
...
...
@@ -256,7 +252,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
session
[
:ask_for_usage_stats_consent
]
=
current_user
.
requires_usage_stats_consent?
end
redirect_path
=
referer_path
(
request
)
||
admin_application_settings_path
redirect_path
=
referer_path
(
request
)
||
general_
admin_application_settings_path
respond_to
do
|
format
|
if
successful
...
...
app/views/admin/dashboard/index.html.haml
View file @
ed01d53c
...
...
@@ -42,7 +42,7 @@
.well-segment.admin-well.admin-well-features
%h4
Features
=
feature_entry
(
_
(
'Sign up'
),
href:
admin_application_settings_path
(
anchor:
'js-signup-settings'
),
href:
general_
admin_application_settings_path
(
anchor:
'js-signup-settings'
),
enabled:
allow_signup?
)
=
feature_entry
(
_
(
'LDAP'
),
...
...
@@ -50,11 +50,11 @@
doc_href:
help_page_path
(
'administration/auth/ldap'
))
=
feature_entry
(
_
(
'Gravatar'
),
href:
admin_application_settings_path
(
anchor:
'js-account-settings'
),
href:
general_
admin_application_settings_path
(
anchor:
'js-account-settings'
),
enabled:
gravatar_enabled?
)
=
feature_entry
(
_
(
'OmniAuth'
),
href:
admin_application_settings_path
(
anchor:
'js-signin-settings'
),
href:
general_
admin_application_settings_path
(
anchor:
'js-signin-settings'
),
enabled:
Gitlab
::
Auth
.
omniauth_enabled?
,
doc_href:
help_page_path
(
'integration/omniauth'
))
...
...
@@ -85,7 +85,7 @@
.float-right
=
version_status_badge
%p
%a
{
href:
admin_application_settings_path
}
%a
{
href:
general_
admin_application_settings_path
}
GitLab
%span
.float-right
=
Gitlab
::
VERSION
...
...
app/views/layouts/nav/sidebar/_admin.html.haml
View file @
ed01d53c
...
...
@@ -221,7 +221,7 @@
=
_
(
'Appearance'
)
=
nav_link
(
controller: :application_settings
)
do
=
link_to
admin_application_settings_path
do
=
link_to
general_
admin_application_settings_path
do
.nav-icon-container
=
sprite_icon
(
'settings'
)
%span
.nav-item-name.qa-admin-settings-item
...
...
@@ -229,11 +229,11 @@
%ul
.sidebar-sub-level-items.qa-admin-sidebar-settings-submenu
=
nav_link
(
controller: :application_settings
,
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
admin_application_settings_path
do
=
link_to
general_
admin_application_settings_path
do
%strong
.fly-out-top-item-name
=
_
(
'Settings'
)
%li
.divider.fly-out-top-item
=
nav_link
(
path:
'application_settings#
show
'
)
do
=
nav_link
(
path:
'application_settings#
general
'
)
do
=
link_to
general_admin_application_settings_path
,
title:
_
(
'General'
),
class:
'qa-admin-settings-general-item'
do
%span
=
_
(
'General'
)
...
...
changelogs/unreleased/43659-single-path-for-general-settings.yml
0 → 100644
View file @
ed01d53c
---
title
:
Deprecate /admin/application_settings in favor of /admin/application_settings/general. The former path is to be removed in 13.0.
merge_request
:
22252
author
:
Alexander Oleynikov
type
:
changed
config/routes/admin.rb
View file @
ed01d53c
...
...
@@ -107,7 +107,11 @@ namespace :admin do
end
end
resource
:application_settings
,
only:
[
:show
,
:update
]
do
resource
:application_settings
,
only: :update
do
# This redirect should be removed with 13.0 release.
# https://gitlab.com/gitlab-org/gitlab/issues/199427
get
'/'
,
to:
redirect
(
'admin/application_settings/general'
),
as:
nil
resources
:services
,
only:
[
:index
,
:edit
,
:update
]
get
:usage_data
...
...
doc/administration/geo/replication/configuration.md
View file @
ed01d53c
...
...
@@ -249,7 +249,7 @@ on the **secondary** node.
Geo synchronizes repositories over HTTP/HTTPS, and therefore requires this clone
method to be enabled. Navigate to
**Admin Area > Settings**
(
`/admin/application_settings`
) on the
**primary**
node, and set
(
`/admin/application_settings
/general
`
) on the
**primary**
node, and set
`Enabled Git access protocols`
to
`Both SSH and HTTP(S)`
or
`Only HTTP(S)`
.
### Step 7. Verify proper functioning of the **secondary** node
...
...
doc/administration/raketasks/project_import_export.md
View file @
ed01d53c
...
...
@@ -33,8 +33,8 @@ bundle exec rake gitlab:import_export:data RAILS_ENV=production
Note the following:
-
Importing is not possible if the version of the import instance is older than that of the exporter.
-
The project import option must be enabled in
application settings (
`/admin/application_settings
`
) under
**Import sources**
, which is available
-
The project import option must be enabled in
application settings
(
`/admin/application_settings/general
`
) under
**Import sources**
, which is available
under
**{admin}**
**Admin Area >**
**{settings}**
**Settings > Visibility and access controls**
.
-
The exports are stored in a temporary
[
shared directory
](
../../development/shared_files.md
)
and are deleted every 24 hours by a specific worker.
doc/api/settings.md
View file @
ed01d53c
...
...
@@ -2,7 +2,7 @@
These API calls allow you to read and modify GitLab instance
[
application settings
](
#list-of-settings-that-can-be-accessed-via-api-calls
)
as appear in
`/admin/application_settings`
. You have to be an
as appear in
`/admin/application_settings
/general
`
. You have to be an
administrator in order to perform this action.
## Get current application settings
...
...
doc/development/documentation/styleguide.md
View file @
ed01d53c
...
...
@@ -201,7 +201,7 @@ The table below shows what kind of documentation goes where.
describing what can be achieved by accessing GitLab's admin interface
(_not to be confused with
`doc/administration`
where server access is
required_).
1.
Every category under
`/admin/application_settings`
should have its
1.
Every category under
`/admin/application_settings
/
`
should have its
own document located at
`doc/user/admin_area/settings/`
. For example,
the
**Visibility and Access Controls**
category should have a document
located at
`doc/user/admin_area/settings/visibility_and_access_controls.md`
.
...
...
doc/security/password_length_limits.md
View file @
ed01d53c
...
...
@@ -49,7 +49,7 @@ From GitLab 12.6, the minimum password length set in this configuration file wil
The user password length is set to a minimum of 8 characters by default.
To change that using GitLab UI:
In
**Admin Area > Settings**
(
`/admin/application_settings`
), go to the section
**Sign-up restrictions**
.
In
**Admin Area > Settings**
(
`/admin/application_settings
/general
`
), go to the section
**Sign-up restrictions**
.
[
Minimum password length settings
](
../user/admin_area/img/minimum_password_length_settings_v12_6.png
)
...
...
doc/security/ssh_keys_restrictions.md
View file @
ed01d53c
...
...
@@ -17,7 +17,7 @@ algorithms.
GitLab allows you to restrict the allowed SSH key technology as well as specify
the minimum key length for each technology.
In
**Admin Area > Settings**
(
`/admin/application_settings`
), expand the
In
**Admin Area > Settings**
(
`/admin/application_settings
/general
`
), expand the
**Visibility and access controls**
section:
![
SSH keys restriction admin settings
](
img/ssh_keys_restrictions_settings.png
)
...
...
doc/security/two_factor_authentication.md
View file @
ed01d53c
...
...
@@ -25,7 +25,8 @@ won't be able to leave the 2FA configuration area at `/profile/two_factor_auth`.
To enable 2FA for all users:
1.
Navigate to
**Admin Area > Settings > General**
(
`/admin/application_settings`
).
1.
Navigate to
**Admin Area > Settings > General**
(
`/admin/application_settings/general`
).
1.
Expand the
**Sign-in restrictions**
section, where you can configure both.
If you want 2FA enforcement to take effect on next login, change the grace
...
...
doc/security/user_email_confirmation.md
View file @
ed01d53c
...
...
@@ -8,7 +8,7 @@ GitLab can be configured to require confirmation of a user's email address when
the user signs up. When this setting is enabled, the user is unable to sign in until
they confirm their email address.
In
**Admin Area > Settings**
(
`/admin/application_settings`
), go to the section
In
**Admin Area > Settings**
(
`/admin/application_settings
/general
`
), go to the section
**Sign-up Restrictions**
and look for the
**Send confirmation email on sign-up**
option.
<!-- ## Troubleshooting
...
...
doc/user/project/settings/import_export.md
View file @
ed01d53c
...
...
@@ -17,8 +17,8 @@ Note the following:
-
Importing is not possible if the import instance version differs from
that of the exporter.
-
The project import option must be enabled in
application settings (
`/admin/application_settings`
) under
under
**Import sources**
, which is
-
The project import option must be enabled in
application settings
(
`/admin/application_settings/general`
)
under
**Import sources**
, which is
available under
**{admin}**
**Admin Area >**
**{settings}**
**Settings > Visibility and access controls**
.
Ask your administrator if you don't see the
**GitLab export**
button when
creating a new project.
...
...
ee/spec/controllers/admin/application_settings_controller_spec.rb
View file @
ed01d53c
...
...
@@ -42,7 +42,7 @@ describe Admin::ApplicationSettingsController do
put
:update
,
params:
{
application_setting:
settings
}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
response
).
to
redirect_to
(
general_
admin_application_settings_path
)
settings
.
except
(
:elasticsearch_url
,
:repository_size_limit
).
each
do
|
setting
,
value
|
expect
(
ApplicationSetting
.
current
.
public_send
(
setting
)).
to
eq
(
value
)
end
...
...
@@ -136,7 +136,7 @@ describe Admin::ApplicationSettingsController do
it
'updates repository_size_limit'
do
put
:update
,
params:
{
application_setting:
{
repository_size_limit:
'100'
}
}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
response
).
to
redirect_to
(
general_
admin_application_settings_path
)
expect
(
response
).
to
set_flash
[
:notice
].
to
(
'Application settings saved successfully'
)
end
...
...
spec/controllers/admin/application_settings_controller_spec.rb
View file @
ed01d53c
...
...
@@ -56,49 +56,49 @@ describe Admin::ApplicationSettingsController do
it
'updates the password_authentication_enabled_for_git setting'
do
put
:update
,
params:
{
application_setting:
{
password_authentication_enabled_for_git:
"0"
}
}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
response
).
to
redirect_to
(
general_
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
password_authentication_enabled_for_git
).
to
eq
(
false
)
end
it
'updates the default_project_visibility for string value'
do
put
:update
,
params:
{
application_setting:
{
default_project_visibility:
"20"
}
}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
response
).
to
redirect_to
(
general_
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
default_project_visibility
).
to
eq
(
Gitlab
::
VisibilityLevel
::
PUBLIC
)
end
it
'update the restricted levels for string values'
do
put
:update
,
params:
{
application_setting:
{
restricted_visibility_levels:
%w[10 20]
}
}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
response
).
to
redirect_to
(
general_
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
restricted_visibility_levels
).
to
eq
([
10
,
20
])
end
it
'updates the restricted_visibility_levels when empty array is passed'
do
put
:update
,
params:
{
application_setting:
{
restricted_visibility_levels:
[
""
]
}
}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
response
).
to
redirect_to
(
general_
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
restricted_visibility_levels
).
to
be_empty
end
it
'updates the receive_max_input_size setting'
do
put
:update
,
params:
{
application_setting:
{
receive_max_input_size:
"1024"
}
}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
response
).
to
redirect_to
(
general_
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
receive_max_input_size
).
to
eq
(
1024
)
end
it
'updates the default_project_creation for string value'
do
put
:update
,
params:
{
application_setting:
{
default_project_creation:
::
Gitlab
::
Access
::
MAINTAINER_PROJECT_ACCESS
}
}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
response
).
to
redirect_to
(
general_
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
default_project_creation
).
to
eq
(
::
Gitlab
::
Access
::
MAINTAINER_PROJECT_ACCESS
)
end
it
'updates minimum_password_length setting'
do
put
:update
,
params:
{
application_setting:
{
minimum_password_length:
10
}
}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
response
).
to
redirect_to
(
general_
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
minimum_password_length
).
to
eq
(
10
)
end
...
...
spec/features/admin/admin_disables_git_access_protocol_spec.rb
View file @
ed01d53c
...
...
@@ -121,7 +121,7 @@ describe 'Admin disables Git access protocol', :js do
end
def
switch_git_protocol
(
value
)
visit
admin_application_settings_path
visit
general_
admin_application_settings_path
page
.
within
(
'.as-visibility-access'
)
do
find
(
'#application_setting_enabled_git_access_protocol'
).
find
(
:xpath
,
"option[
#{
value
}
]"
).
select_option
...
...
spec/features/admin/admin_mode_spec.rb
View file @
ed01d53c
...
...
@@ -37,7 +37,7 @@ describe 'Admin mode', :clean_gitlab_redis_shared_state, :do_not_mock_admin_mode
end
it
'is necessary to provide credentials again before opening pages in admin scope'
do
visit
admin_application_settings_path
# admin logged out because not in admin_mode
visit
general_
admin_application_settings_path
# admin logged out because not in admin_mode
expect
(
page
).
to
have_current_path
(
new_admin_session_path
)
end
...
...
spec/features/admin/admin_settings_spec.rb
View file @
ed01d53c
...
...
@@ -458,11 +458,11 @@ describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_not_moc
stub_env
(
'IN_MEMORY_APPLICATION_SETTINGS'
,
'false'
)
sign_in
(
admin
)
visit
admin_application_settings_path
visit
general_
admin_application_settings_path
end
it
'loads admin settings page without redirect for reauthentication'
do
expect
(
current_path
).
to
eq
admin_application_settings_path
expect
(
current_path
).
to
eq
general_
admin_application_settings_path
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