diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-18 18:10:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-18 18:10:37 +0300 |
commit | b556d0fab74a7ef460d868e508ea5ca72d0e5eed (patch) | |
tree | d0e0dce2c15d056b37e0fdd9495d754cffe2f7ef /app | |
parent | a300f4d5c7fdd5d557288ee526986e0adb683b35 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
7 files changed, 18 insertions, 13 deletions
diff --git a/app/assets/stylesheets/lazy_bundles/gridstack.scss b/app/assets/stylesheets/lazy_bundles/gridstack.scss new file mode 100644 index 00000000000..235b225d747 --- /dev/null +++ b/app/assets/stylesheets/lazy_bundles/gridstack.scss @@ -0,0 +1 @@ +@import 'gridstack/dist/gridstack'; diff --git a/app/models/concerns/boards/listable.rb b/app/models/concerns/boards/listable.rb index b9827a79422..b09ef7e612d 100644 --- a/app/models/concerns/boards/listable.rb +++ b/app/models/concerns/boards/listable.rb @@ -13,7 +13,7 @@ module Boards scope :ordered, -> { order(:list_type, :position) } scope :destroyable, -> { where(list_type: list_types.slice(*destroyable_types).values) } scope :movable, -> { where(list_type: list_types.slice(*movable_types).values) } - scope :without_types, ->(list_types) { where.not(list_type: list_types) } + scope :with_types, ->(list_types) { where(list_type: list_types) } class << self def preload_preferences_for_user(lists, user) diff --git a/app/services/boards/lists/list_service.rb b/app/services/boards/lists/list_service.rb index e81ef467a4e..cf15db4314c 100644 --- a/app/services/boards/lists/list_service.rb +++ b/app/services/boards/lists/list_service.rb @@ -9,23 +9,27 @@ module Boards end lists = board.lists.preload_associated_models + lists = lists.with_types(available_list_types_for(board)) return lists.id_in(params[:list_id]) if params[:list_id].present? - list_types = unavailable_list_types_for(board) - lists.without_types(list_types) + lists end private - def unavailable_list_types_for(board) - hidden_lists_for(board) + def available_list_types_for(board) + licensed_list_types(board) + visible_lists(board) end - def hidden_lists_for(board) - [].tap do |hidden| - hidden << ::List.list_types[:backlog] if board.hide_backlog_list? - hidden << ::List.list_types[:closed] if board.hide_closed_list? + def licensed_list_types(board) + [List.list_types[:label]] + end + + def visible_lists(board) + [].tap do |visible| + visible << ::List.list_types[:backlog] unless board.hide_backlog_list? + visible << ::List.list_types[:closed] unless board.hide_closed_list? end end end diff --git a/app/views/notify/two_factor_otp_attempt_failed_email.html.haml b/app/views/notify/two_factor_otp_attempt_failed_email.html.haml index aea5a626636..fec7083e524 100644 --- a/app/views/notify/two_factor_otp_attempt_failed_email.html.haml +++ b/app/views/notify/two_factor_otp_attempt_failed_email.html.haml @@ -42,7 +42,7 @@ %tbody %tr{ style: 'width:100%;' } %td{ style: "#{default_style}text-align:center;" } - - password_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: 'https://docs.gitlab.com/ee/user/profile/#changing-your-password' } + - password_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: 'https://docs.gitlab.com/ee/user/profile/user_passwords.html#change-your-password' } = _('If you recently tried to sign in, but mistakenly entered a wrong two-factor authentication code, you may ignore this email.') - if password_authentication_enabled_for_web? diff --git a/app/views/notify/two_factor_otp_attempt_failed_email.text.haml b/app/views/notify/two_factor_otp_attempt_failed_email.text.haml index 0a5784ab835..8f839cd83ee 100644 --- a/app/views/notify/two_factor_otp_attempt_failed_email.text.haml +++ b/app/views/notify/two_factor_otp_attempt_failed_email.text.haml @@ -3,5 +3,5 @@ = _('We detected an attempt to sign in to your %{host} account using a wrong two-factor authentication code, from the following IP address: %{ip}, at %{time}') % { host: Gitlab.config.gitlab.host, ip: @ip, time: @time } = _('If you recently tried to sign in, but mistakenly entered a wrong two-factor authentication code, you may ignore this email.') -= _('If you did not recently try to sign in, you should immediately change your password: %{password_link}.') % { password_link: 'https://docs.gitlab.com/ee/user/profile/#changing-your-password' } += _('If you did not recently try to sign in, you should immediately change your password: %{password_link}.') % { password_link: 'https://docs.gitlab.com/ee/user/profile/user_passwords.html#change-your-password' } = _('Make sure you choose a strong, unique password.') diff --git a/app/views/notify/unknown_sign_in_email.html.haml b/app/views/notify/unknown_sign_in_email.html.haml index 47c5656db27..b1c79274e26 100644 --- a/app/views/notify/unknown_sign_in_email.html.haml +++ b/app/views/notify/unknown_sign_in_email.html.haml @@ -42,7 +42,7 @@ %tbody %tr{ style: 'width:100%;' } %td{ style: "#{default_style}text-align:center;" } - - password_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: 'https://docs.gitlab.com/ee/user/profile/#changing-your-password' } + - password_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: 'https://docs.gitlab.com/ee/user/profile/user_passwords.html#change-your-password' } = _('If you recently signed in and recognize the IP address, you may disregard this email.') - if password_authentication_enabled_for_web? diff --git a/app/views/notify/unknown_sign_in_email.text.haml b/app/views/notify/unknown_sign_in_email.text.haml index f3efc4c4fcd..54c7a245ab9 100644 --- a/app/views/notify/unknown_sign_in_email.text.haml +++ b/app/views/notify/unknown_sign_in_email.text.haml @@ -3,7 +3,7 @@ = _('A sign-in to your account has been made from the following IP address: %{ip}') % { ip: @ip } = _('If you recently signed in and recognize the IP address, you may disregard this email.') -= _('If you did not recently sign in, you should immediately change your password: %{password_link}.') % { password_link: 'https://docs.gitlab.com/ee/user/profile/#changing-your-password' } += _('If you did not recently sign in, you should immediately change your password: %{password_link}.') % { password_link: 'https://docs.gitlab.com/ee/user/profile/user_passwords.html#change-your-password' } = _('Passwords should be unique and not used for any other sites or services.') - unless @user.two_factor_enabled? |