Skip to content
Snippets Groups Projects
Commit cfbaef3f authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent a97acfe5
No related branches found
No related tags found
No related merge requests found
Showing
with 153 additions and 2 deletions
Loading
Loading
@@ -4,13 +4,14 @@ class Profiles::NotificationsController < Profiles::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
def show
@user = current_user
@group_notifications = current_user.notification_settings.for_groups.order(:id)
@group_notifications = current_user.notification_settings.preload_source_route.for_groups.order(:id)
@group_notifications += GroupsFinder.new(
current_user,
all_available: false,
exclude_group_ids: @group_notifications.select(:source_id)
).execute.map { |group| current_user.notification_settings_for(group, inherit: true) }
@project_notifications = current_user.notification_settings.for_projects.order(:id)
.preload_source_route
.select { |notification| current_user.can?(:read_project, notification.source) }
@global_notification_setting = current_user.global_notification_setting
end
Loading
Loading
Loading
Loading
@@ -27,6 +27,8 @@ class NotificationSetting < ApplicationRecord
.where.not(projects: { pending_delete: true })
end
 
scope :preload_source_route, -> { preload(source: [:route]) }
EMAIL_EVENTS = [
:new_release,
:new_note,
Loading
Loading
Loading
Loading
@@ -44,6 +44,8 @@ class AuditEventService
end
 
def log_security_event_to_database
return if Gitlab::Database.read_only?
SecurityEvent.create(base_payload.merge(details: @details))
end
end
Loading
Loading
---
title: Remove N+1 query for profile notifications
merge_request: 22845
author: Ohad Dahan
type: performance
---
title: 'Geo: Add tables to prepare to replicate package files'
merge_request: 23447
author:
type: added
Loading
Loading
@@ -55,6 +55,8 @@ module Gitlab
memo << ee_path.to_s
end
 
ee_paths << "#{config.root}/ee/app/replicators"
# Eager load should load CE first
config.eager_load_paths.push(*ee_paths)
config.helpers_paths.push "#{config.root}/ee/app/helpers"
Loading
Loading
Loading
Loading
@@ -19,6 +19,7 @@ ActiveSupport::Inflector.inflections do |inflect|
group_view
job_artifact_registry
lfs_object_registry
package_file_registry
project_auto_devops
project_registry
project_statistics
Loading
Loading
Loading
Loading
@@ -3,5 +3,5 @@
# This file requires config/initializers/1_settings.rb
 
if Rails.env.development?
Rails.application.config.hosts << Gitlab.config.gitlab.host
Rails.application.config.hosts += [Gitlab.config.gitlab.host, 'unix']
end
# frozen_string_literal: true
class CreateGeoEvents < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
create_table :geo_events do |t|
t.string :replicable_name, limit: 255, null: false
t.string :event_name, limit: 255, null: false
t.jsonb :payload, default: {}, null: false
t.datetime_with_timezone :created_at, null: false
end
end
end
# frozen_string_literal: true
class AddGeoEventIdToGeoEventLog < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
add_column :geo_event_log, :geo_event_id, :integer
end
end
# frozen_string_literal: true
class AddGeoEventIdIndexToGeoEventLog < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :geo_event_log, :geo_event_id,
where: "(geo_event_id IS NOT NULL)",
using: :btree,
name: 'index_geo_event_log_on_geo_event_id'
end
def down
remove_concurrent_index :geo_event_log, :geo_event_id, name: 'index_geo_event_log_on_geo_event_id'
end
end
# frozen_string_literal: true
class AddGeoEventsForeignKey < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_foreign_key :geo_event_log, :geo_events,
column: :geo_event_id,
name: 'fk_geo_event_log_on_geo_event_id',
on_delete: :cascade
end
def down
remove_foreign_key_without_error :geo_event_log, column: :geo_event_id, name: 'fk_geo_event_log_on_geo_event_id'
end
end
Loading
Loading
@@ -1665,8 +1665,10 @@ ActiveRecord::Schema.define(version: 2020_02_04_131054) do
t.bigint "reset_checksum_event_id"
t.bigint "cache_invalidation_event_id"
t.bigint "container_repository_updated_event_id"
t.integer "geo_event_id"
t.index ["cache_invalidation_event_id"], name: "index_geo_event_log_on_cache_invalidation_event_id", where: "(cache_invalidation_event_id IS NOT NULL)"
t.index ["container_repository_updated_event_id"], name: "index_geo_event_log_on_container_repository_updated_event_id"
t.index ["geo_event_id"], name: "index_geo_event_log_on_geo_event_id", where: "(geo_event_id IS NOT NULL)"
t.index ["hashed_storage_attachments_event_id"], name: "index_geo_event_log_on_hashed_storage_attachments_event_id", where: "(hashed_storage_attachments_event_id IS NOT NULL)"
t.index ["hashed_storage_migrated_event_id"], name: "index_geo_event_log_on_hashed_storage_migrated_event_id", where: "(hashed_storage_migrated_event_id IS NOT NULL)"
t.index ["job_artifact_deleted_event_id"], name: "index_geo_event_log_on_job_artifact_deleted_event_id", where: "(job_artifact_deleted_event_id IS NOT NULL)"
Loading
Loading
@@ -1680,6 +1682,13 @@ ActiveRecord::Schema.define(version: 2020_02_04_131054) do
t.index ["upload_deleted_event_id"], name: "index_geo_event_log_on_upload_deleted_event_id", where: "(upload_deleted_event_id IS NOT NULL)"
end
 
create_table "geo_events", force: :cascade do |t|
t.string "replicable_name", limit: 255, null: false
t.string "event_name", limit: 255, null: false
t.jsonb "payload", default: {}, null: false
t.datetime_with_timezone "created_at", null: false
end
create_table "geo_hashed_storage_attachments_events", force: :cascade do |t|
t.integer "project_id", null: false
t.text "old_attachments_path", null: false
Loading
Loading
@@ -4650,6 +4659,7 @@ ActiveRecord::Schema.define(version: 2020_02_04_131054) do
add_foreign_key "geo_container_repository_updated_events", "container_repositories", name: "fk_212c89c706", on_delete: :cascade
add_foreign_key "geo_event_log", "geo_cache_invalidation_events", column: "cache_invalidation_event_id", name: "fk_42c3b54bed", on_delete: :cascade
add_foreign_key "geo_event_log", "geo_container_repository_updated_events", column: "container_repository_updated_event_id", name: "fk_6ada82d42a", on_delete: :cascade
add_foreign_key "geo_event_log", "geo_events", name: "fk_geo_event_log_on_geo_event_id", on_delete: :cascade
add_foreign_key "geo_event_log", "geo_hashed_storage_migrated_events", column: "hashed_storage_migrated_event_id", name: "fk_27548c6db3", on_delete: :cascade
add_foreign_key "geo_event_log", "geo_job_artifact_deleted_events", column: "job_artifact_deleted_event_id", name: "fk_176d3fbb5d", on_delete: :cascade
add_foreign_key "geo_event_log", "geo_lfs_object_deleted_events", column: "lfs_object_deleted_event_id", name: "fk_d5af95fcd9", on_delete: :cascade
Loading
Loading
Loading
Loading
@@ -228,3 +228,6 @@ who are aware of the risks.
- [Repairing and recovering broken Git repositories](https://git.seveas.net/repairing-and-recovering-broken-git-repositories.html)
- [Testing with OpenSSL](https://www.feistyduck.com/library/openssl-cookbook/online/ch-testing-with-openssl.html)
- [Strace zine](https://wizardzines.com/zines/strace/)
- GitLab.com-specific resources:
- [Group SAML/SCIM setup](troubleshooting/group_saml_scim.md)
\ No newline at end of file
---
type: reference
---
# Group SAML and SCIM troubleshooting **(SILVER ONLY)**
These are notes and screenshots regarding Group SAML and SCIM that the GitLab Support Team sometimes uses while troubleshooting, but which do not fit into the official documentation. GitLab is making this public, so that anyone can make use of the Support team’s collected knowledge.
Please refer to GitLab's [Group SAML](../../user/group/saml_sso/index.md) docs for information on the feature and how to set it up.
When troubleshooting a SAML configuration, GitLab team members will frequently start with the [SAML troubleshooting section](../../user/group/saml_sso/index.md#troubleshooting).
They may then set up a test configuration of the desired identity provider. We include example screenshots in this section.
## SAML and SCIM screenshots
This section includes relevant screenshots of the following example configurations of [Group SAML](../../user/group/saml_sso/index.md) and [Group SCIM](../../user/group/saml_sso/scim_setup.md):
- [Azure Active Directory](#azure-active-directory)
- [OneLogin](#onelogin)
CAUTION: **Caution:**
These screenshots are updated only as needed by GitLab Support. They are **not** official documentation.
If you are currently having an issue with GitLab, you may want to check your [support options](https://about.gitlab.com/support/).
## Azure Active Directory
Basic SAML app configuration:
![Azure AD basic SAML](img/AzureAD-basic_SAML.png)
User claims and attributes:
![Azure AD user claims](img/AzureAD-claims.png)
SCIM mapping:
![Azure AD SCIM](img/AzureAD-scim_attribute_mapping.png)
## OneLogin
Application details:
![OneLogin application details](img/OneLogin-app_details.png)
Parameters:
![OneLogin application details](img/OneLogin-parameters.png)
Adding a user:
![OneLogin user add](img/OneLogin-userAdd.png)
SSO settings:
![OneLogin SSO settings](img/OneLogin-SSOsettings.png)
doc/administration/troubleshooting/img/AzureAD-basic_SAML.png

134 KiB

doc/administration/troubleshooting/img/AzureAD-claims.png

54.3 KiB

doc/administration/troubleshooting/img/AzureAD-scim_attribute_mapping.png

33.8 KiB

doc/administration/troubleshooting/img/OneLogin-SSOsettings.png

83.2 KiB

doc/administration/troubleshooting/img/OneLogin-app_details.png

60 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment