Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Greenlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arbeitsgruppe Hardwarenahe IT-Systeme
Greenlight
Commits
afc7e791
Unverified
Commit
afc7e791
authored
2 years ago
by
Khemissi Amir
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
V3 Migrations: Minor Fixes to `migrations:site_settings` task. (#4746)
parent
5be4e7b8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/tasks/migrations/migrations.rake
+14
-14
14 additions, 14 deletions
lib/tasks/migrations/migrations.rake
with
14 additions
and
14 deletions
lib/tasks/migrations/migrations.rake
+
14
−
14
View file @
afc7e791
...
...
@@ -165,27 +165,27 @@ namespace :migrations do
task
settings: :environment
do
|
_task
|
has_encountred_issue
=
0
setting
s_hash
=
Setting
.
find_by
(
provider:
'greenlight'
)
.
features
.
pluck
(
:name
,
:value
).
to_h
setting
=
Setting
.
includes
(
:features
).
find_by
(
provider:
'greenlight'
)
# SiteSettings
site_settings
=
{
PrimaryColor
:
setting
s_hash
[
'Primary Color'
]
,
PrimaryColorLight
:
setting
s_hash
[
'Primary Color Lighten'
]
,
Terms
:
setting
s_hash
[
'Legal URL'
]
,
PrivacyPolicy
:
setting
s_hash
[
'Privacy Policy URL'
]
,
RegistrationMethod
:
infer_registration_method
(
setting
s_hash
[
'Registration Method'
]
),
ShareRooms
:
setting
s_hash
[
'Shared Access'
]
,
PreuploadPresentation
:
setting
s_hash
[
'Preupload Presentation'
]
,
PrimaryColor
:
setting
.
get_value
(
'Primary Color'
)
,
PrimaryColorLight
:
setting
.
get_value
(
'Primary Color Lighten'
)
,
Terms
:
setting
.
get_value
(
'Legal URL'
)
,
PrivacyPolicy
:
setting
.
get_value
(
'Privacy Policy URL'
)
,
RegistrationMethod
:
infer_registration_method
(
setting
.
get_value
(
'Registration Method'
)
),
ShareRooms
:
setting
.
get_value
(
'Shared Access'
)
,
PreuploadPresentation
:
setting
.
get_value
(
'Preupload Presentation'
)
,
}.
compact
# RoomConfigurations
room_configurations
=
{
record:
infer_room_config_value
(
setting
s_hash
[
'Room Configuration Recording'
]
),
muteOnStart:
infer_room_config_value
(
setting
s_hash
[
'Room Configuration Mute On Join'
]
),
guestPolicy:
infer_room_config_value
(
setting
s_hash
[
'Room Configuration Require Moderator'
]
),
glAnyoneCanStart:
infer_room_config_value
(
setting
s_hash
[
'Room Configuration Allow Any Start'
]
),
glAnyoneJoinAsModerator:
infer_room_config_value
(
setting
s_hash
[
'Room Configuration All Join Moderator'
]
),
glRequireAuthentication:
infer_room_config_value
(
setting
s_hash
[
'Room Authentication'
]
)
record:
infer_room_config_value
(
setting
.
get_value
(
'Room Configuration Recording'
)
),
muteOnStart:
infer_room_config_value
(
setting
.
get_value
(
'Room Configuration Mute On Join'
)
),
guestPolicy:
infer_room_config_value
(
setting
.
get_value
(
'Room Configuration Require Moderator'
)
),
glAnyoneCanStart:
infer_room_config_value
(
setting
.
get_value
(
'Room Configuration Allow Any Start'
)
),
glAnyoneJoinAsModerator:
infer_room_config_value
(
setting
.
get_value
(
'Room Configuration All Join Moderator'
)
),
glRequireAuthentication:
infer_room_config_value
(
setting
.
get_value
(
'Room Authentication'
)
)
}.
compact
params
=
{
settings:
{
site_settings:
site_settings
,
room_configurations:
room_configurations
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment