Protect non public methods

parent 16013beb
...@@ -12,10 +12,6 @@ module Gitlab ...@@ -12,10 +12,6 @@ module Gitlab
self.auth_hash = auth_hash self.auth_hash = auth_hash
end end
def auth_hash=(auth_hash)
@auth_hash = AuthHash.new(auth_hash)
end
def persisted? def persisted?
gl_user.persisted? gl_user.persisted?
end end
...@@ -43,6 +39,11 @@ module Gitlab ...@@ -43,6 +39,11 @@ module Gitlab
@user ||= find_by_uid_and_provider || build_new_user @user ||= find_by_uid_and_provider || build_new_user
end end
protected
def auth_hash=(auth_hash)
@auth_hash = AuthHash.new(auth_hash)
end
def find_by_uid_and_provider def find_by_uid_and_provider
model.where(provider: auth_hash.provider, extern_uid: auth_hash.uid).last model.where(provider: auth_hash.provider, extern_uid: auth_hash.uid).last
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment