summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-19 13:38:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-19 13:38:27 +0000
commit18d7766e9e65a0966fd91b0959f49c96f8ad5845 (patch)
tree93bea1b4d4fb571a34ec92198d6844e481eaa7af /app
parente23e7bc48165be175d7078d5e6fee002057046fd (diff)
downloadgitlab-ce-18d7766e9e65a0966fd91b0959f49c96f8ad5845.tar.gz
Add latest changes from gitlab-org/gitlab@15-4-stable-ee
Diffstat (limited to 'app')
-rw-r--r--app/helpers/appearances_helper.rb8
-rw-r--r--app/models/issue.rb6
-rw-r--r--app/views/layouts/devise.html.haml4
3 files changed, 13 insertions, 5 deletions
diff --git a/app/helpers/appearances_helper.rb b/app/helpers/appearances_helper.rb
index 6dbd0f7bd7b..957c2afb6d2 100644
--- a/app/helpers/appearances_helper.rb
+++ b/app/helpers/appearances_helper.rb
@@ -14,7 +14,13 @@ module AppearancesHelper
end
def brand_image
- image_tag(current_appearance.logo_path) if current_appearance&.logo?
+ image_tag(brand_image_path, alt: brand_title, class: 'gl-w-10')
+ end
+
+ def brand_image_path
+ return current_appearance.logo_path if current_appearance&.logo?
+
+ image_path('logo.svg')
end
def brand_text
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 153747c75df..754591b8017 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -160,7 +160,7 @@ class Issue < ApplicationRecord
scope :with_api_entity_associations, -> {
preload(:timelogs, :closed_by, :assignees, :author, :labels, :issuable_severity,
milestone: { project: [:route, { namespace: :route }] },
- project: [:route, { namespace: :route }],
+ project: [:project_feature, :route, { namespace: :route }],
duplicated_to: { project: [:project_feature] })
}
scope :with_issue_type, ->(types) { where(issue_type: types) }
@@ -612,7 +612,9 @@ class Issue < ApplicationRecord
# for performance reasons, check commit: 002ad215818450d2cbbc5fa065850a953dc7ada8
# Make sure to sync this method with issue_policy.rb
def readable_by?(user)
- if user.can_read_all_resources?
+ if !project.issues_enabled?
+ false
+ elsif user.can_read_all_resources?
true
elsif project.personal? && project.team.owner?(user)
true
diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml
index 6650e07be2a..3532c6638ce 100644
--- a/app/views/layouts/devise.html.haml
+++ b/app/views/layouts/devise.html.haml
@@ -13,9 +13,9 @@
= render "layouts/flash"
.mt-3
.col-sm-12.gl-text-center
- %img.gl-w-10{ :alt => _("GitLab Logo"), :src => image_path('logo.svg') }
+ = brand_image
%h1.mb-3.gl-font-size-h2
- = current_appearance&.title.presence || _('GitLab')
+ = brand_title
- if current_appearance&.description?
= brand_text
= render_if_exists 'layouts/devise_help_text'