-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15318 from hennevogel/bugfix/15315
Redirect to login page or root if anonymous
- Loading branch information
Showing
7 changed files
with
159 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
module ConfigurationConstants | ||
extend ActiveSupport::Concern | ||
|
||
# note: do not add defaults here. It must be either the options.yml content or nil | ||
# rubocop:disable Style/MutableConstant | ||
# FIXME: The hash keys are outputted in the error message of the PUT endpoint in the configurations_controller. | ||
# To remove the confusion, the hash keys should have the same name as the config options from which they take their value. | ||
OPTIONS_YML = { | ||
title: nil, | ||
description: nil, | ||
name: nil, # from BSConfig.pm | ||
download_on_demand: nil, # from BSConfig.pm | ||
enforce_project_keys: nil, # from BSConfig.pm | ||
anonymous: CONFIG['allow_anonymous'], | ||
registration: CONFIG['new_user_registration'], | ||
default_access_disabled: CONFIG['default_access_disabled'], | ||
allow_user_to_create_home_project: CONFIG['allow_user_to_create_home_project'], | ||
disallow_group_creation: CONFIG['disallow_group_creation_with_api'], | ||
change_password: CONFIG['change_passwd'], | ||
obs_url: nil, # inital setup may happen in webui api controller | ||
api_url: nil, | ||
hide_private_options: CONFIG['hide_private_options'], | ||
gravatar: CONFIG['use_gravatar'], | ||
download_url: CONFIG['download_url'], | ||
ymp_url: CONFIG['ymp_url'], | ||
bugzilla_url: CONFIG['bugzilla_host'], | ||
http_proxy: CONFIG['http_proxy'], | ||
no_proxy: nil, | ||
cleanup_after_days: nil, | ||
theme: CONFIG['theme'], | ||
cleanup_empty_projects: nil, | ||
disable_publish_for_branches: nil, | ||
admin_email: nil, | ||
unlisted_projects_filter: nil, | ||
unlisted_projects_filter_description: nil, | ||
tos_url: nil, | ||
code_of_conduct: nil, | ||
default_tracker: nil | ||
} | ||
# rubocop:enable Style/MutableConstant | ||
|
||
ON_OFF_OPTIONS = [:anonymous, :default_access_disabled, :allow_user_to_create_home_project, :disallow_group_creation, | ||
:change_password, :hide_private_options, :gravatar, :download_on_demand, :enforce_project_keys, | ||
:cleanup_empty_projects, :disable_publish_for_branches].freeze | ||
PROXY_MODE_ENABLED_VALUES = [:on, :ichain, :mellon].freeze | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters