Skip to content
Snippets Groups Projects
Commit 7331eaf1 authored by Gosia Ksionek's avatar Gosia Ksionek :palm_tree:
Browse files

Add cr remarks

parent 5727c9e5
No related branches found
No related tags found
1 merge request!9712Force notifications to SAML email address for dedicated users
This commit is part of merge request !9712. Comments created here will be created in the context of that merge request.
# frozen_string_literal: true
class SamlProvider < ActiveRecord::Base
USER_ATTRIBUTES_LOCKED_FOR_MANAGED_ACCOUNTS = [:email, :public_email, :commit_email, :notification_email].freeze
USER_ATTRIBUTES_LOCKED_FOR_MANAGED_ACCOUNTS = %i(email public_email commit_email notification_email).freeze
belongs_to :group
has_many :identities
......
......@@ -3,6 +3,7 @@
module EE
module Users
module UpdateService
extend ::Gitlab::Utils::Override
include EE::Audit::Changes # rubocop: disable Cop/InjectEnterpriseEditionModule
private
......@@ -20,6 +21,7 @@ def model
@user
end
override :assign_attributes
def assign_attributes
params.reject! { |key, _| SamlProvider::USER_ATTRIBUTES_LOCKED_FOR_MANAGED_ACCOUNTS.include?(key.to_sym) } if model.group_managed_account?
super
......
---
title: Block possibility to change email for users with group managed account
merge_request:
merge_request: 9712
author:
type: added
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