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
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r--app/controllers/profiles/notifications_controller.rb8
-rw-r--r--app/controllers/profiles/personal_access_tokens_controller.rb1
-rw-r--r--app/controllers/profiles/two_factor_auths_controller.rb5
3 files changed, 11 insertions, 3 deletions
diff --git a/app/controllers/profiles/notifications_controller.rb b/app/controllers/profiles/notifications_controller.rb
index 57e5ca4d55a..abb6e46394e 100644
--- a/app/controllers/profiles/notifications_controller.rb
+++ b/app/controllers/profiles/notifications_controller.rb
@@ -45,11 +45,17 @@ class Profiles::NotificationsController < Profiles::ApplicationController
projects = project_notifications.map(&:source)
ActiveRecord::Associations::Preloader.new(
records: projects,
- associations: { namespace: [:route, :owner], group: [], creator: [], project_setting: [] }
+ associations: project_associations
).call
Preloaders::UserMaxAccessLevelInProjectsPreloader.new(projects, current_user).execute
project_notifications.select { |notification| current_user.can?(:read_project, notification.source) }
end
# rubocop: enable CodeReuse/ActiveRecord
+
+ def project_associations
+ { namespace: [:route, :owner], group: [], creator: [], project_setting: [] }
+ end
end
+
+Profiles::NotificationsController.prepend_mod
diff --git a/app/controllers/profiles/personal_access_tokens_controller.rb b/app/controllers/profiles/personal_access_tokens_controller.rb
index 0e4d9f3c154..4b6e2f768fa 100644
--- a/app/controllers/profiles/personal_access_tokens_controller.rb
+++ b/app/controllers/profiles/personal_access_tokens_controller.rb
@@ -61,7 +61,6 @@ class Profiles::PersonalAccessTokensController < Profiles::ApplicationController
def set_index_vars
@scopes = Gitlab::Auth.available_scopes_for(current_user)
- @scopes.delete(Gitlab::Auth::K8S_PROXY_SCOPE) unless Feature.enabled?(:k8s_proxy_pat, current_user)
@active_access_tokens = active_access_tokens
end
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb
index e83b72b71a8..f1646027e8e 100644
--- a/app/controllers/profiles/two_factor_auths_controller.rb
+++ b/app/controllers/profiles/two_factor_auths_controller.rb
@@ -140,7 +140,10 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
def build_qr_code
uri = current_user.otp_provisioning_uri(account_string, issuer: issuer_host)
- RQRCode.render_qrcode(uri, :svg, level: :m, unit: 3)
+ RQRCode::QRCode.new(uri, level: :m).as_svg(
+ shape_rendering: "crispEdges",
+ module_size: 3
+ )
end
def account_string