Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-09 18:08:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-09 18:08:56 +0300
commit22d08de610d047ae55ab548d8e398b41b4ce28db (patch)
treef38716073282e42a009c157418d9ec22527fd753 /app
parent0ab6d56c15ebf4a12981556c7d3bc53d9b62cdb9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/boards/stores/actions.js6
-rw-r--r--app/controllers/concerns/send_file_upload.rb11
-rw-r--r--app/helpers/page_layout_helper.rb1
-rw-r--r--app/views/shared/issue_type/_details_header.html.haml4
4 files changed, 6 insertions, 16 deletions
diff --git a/app/assets/javascripts/boards/stores/actions.js b/app/assets/javascripts/boards/stores/actions.js
index bbc7559cd86..54a03b82be0 100644
--- a/app/assets/javascripts/boards/stores/actions.js
+++ b/app/assets/javascripts/boards/stores/actions.js
@@ -316,14 +316,14 @@ export default {
.mutate({
mutation: updateAssignees,
variables: {
- iid: getters.getActiveIssue.iid,
- projectPath: getters.getActiveIssue.referencePath.split('#')[0],
+ iid: getters.activeIssue.iid,
+ projectPath: getters.activeIssue.referencePath.split('#')[0],
assigneeUsernames,
},
})
.then(({ data }) => {
commit('UPDATE_ISSUE_BY_ID', {
- issueId: getters.getActiveIssue.id,
+ issueId: getters.activeIssue.id,
prop: 'assignees',
value: data.issueSetAssignees.issue.assignees.nodes,
});
diff --git a/app/controllers/concerns/send_file_upload.rb b/app/controllers/concerns/send_file_upload.rb
index 2f06cd84ee5..8b053ef7c59 100644
--- a/app/controllers/concerns/send_file_upload.rb
+++ b/app/controllers/concerns/send_file_upload.rb
@@ -70,16 +70,7 @@ module SendFileUpload
Avatarable::ALLOWED_IMAGE_SCALER_WIDTHS.include?(params[:width]&.to_i)
end
- # We use two separate feature gates to allow image resizing.
- # The first, `:dynamic_image_resizing_requester`, based on the content requester.
- # Enabling it for the user would allow that user to send resizing requests for any avatar.
- # The second, `:dynamic_image_resizing_owner`, based on the content owner.
- # Enabling it for the user would allow anyone to send resizing requests against the mentioned user avatar only.
- # This flag allows us to operate on trusted data only, more in https://gitlab.com/gitlab-org/gitlab/-/issues/241533.
- # Because of this, you need to enable BOTH to serve resized image,
- # as you would need at least one allowed requester and at least one allowed avatar.
def scaling_allowed_by_feature_flags?(file_upload)
- Feature.enabled?(:dynamic_image_resizing_requester, current_user) &&
- Feature.enabled?(:dynamic_image_resizing_owner, file_upload.model)
+ Feature.enabled?(:dynamic_image_resizing, default_enabled: true, type: :ops)
end
end
diff --git a/app/helpers/page_layout_helper.rb b/app/helpers/page_layout_helper.rb
index 7630524b545..e39dfa44d86 100644
--- a/app/helpers/page_layout_helper.rb
+++ b/app/helpers/page_layout_helper.rb
@@ -164,7 +164,6 @@ module PageLayoutHelper
strong_memoize(:generic_canonical_url) do
next unless request.get? || request.head?
next unless generate_generic_canonical_url?
- next unless Feature.enabled?(:generic_canonical, current_user)
# Request#url builds the url without the trailing slash
request.url
diff --git a/app/views/shared/issue_type/_details_header.html.haml b/app/views/shared/issue_type/_details_header.html.haml
index 764a7896b6f..9102abf8bc6 100644
--- a/app/views/shared/issue_type/_details_header.html.haml
+++ b/app/views/shared/issue_type/_details_header.html.haml
@@ -36,9 +36,9 @@
- unless current_user == issuable.author
%li= link_to _('Report abuse'), new_abuse_report_path(user_id: issuable.author.id, ref_url: issue_url(issuable))
- if can_update_issue
- %li= link_to _('Close %{display_issuable_type}') % { display_issuable_type: display_issuable_type }, issue_path(issuable, issue: { state_event: :close }, format: 'json'), class: "btn-close js-btn-issue-action #{issue_button_visibility(issuable, true)}", title: _('Close %{display_issuable_type}') % { display_issuable_type: display_issuable_type }
+ %li= link_to _('Close %{display_issuable_type}') % { display_issuable_type: display_issuable_type }, issue_path(issuable, issue: { state_event: :close }, format: 'json'), class: "btn-close js-btn-issue-action #{issue_button_visibility(issuable, true)}", title: _('Close %{display_issuable_type}') % { display_issuable_type: display_issuable_type }, data: { endpoint: close_reopen_issuable_path(issuable) }
- if can_reopen_issue
- %li= link_to _('Reopen %{display_issuable_type}') % { display_issuable_type: display_issuable_type }, issue_path(issuable, issue: { state_event: :reopen }, format: 'json'), class: "btn-reopen js-btn-issue-action #{issue_button_visibility(issuable, false)}", title: _('Reopen %{display_issuable_type}') % { display_issuable_type: display_issuable_type }
+ %li= link_to _('Reopen %{display_issuable_type}') % { display_issuable_type: display_issuable_type }, issue_path(issuable, issue: { state_event: :reopen }, format: 'json'), class: "btn-reopen js-btn-issue-action #{issue_button_visibility(issuable, false)}", title: _('Reopen %{display_issuable_type}') % { display_issuable_type: display_issuable_type }, data: { endpoint: close_reopen_issuable_path(issuable) }
- if can_report_spam
%li= link_to _('Submit as spam'), mark_as_spam_project_issue_path(@project, issuable), method: :post, class: 'btn-spam', title: 'Submit as spam'
- if can_create_issue