This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Commit acf6d14f authored by Sean McGivern's avatar Sean McGivern
Browse files

Merge branch 'pl-user-bot_type-ce' into 'master'

CE Backport: Refactor Service Desk's bot user

See merge request gitlab-org/gitlab-ce!26671
...@@ -537,20 +537,16 @@ def full_path ...@@ -537,20 +537,16 @@ def full_path
username username
end end
def self.internal_attributes
def internal? def internal?
self.class.internal_attributes.any? { |a| self[a] } ghost?
end end
def self.internal def self.internal
where(Hash[[true] * internal_attributes.size)]) where(ghost: true)
end end
def self.non_internal def self.non_internal
where( { |attr| "#{attr} IS NOT TRUE" }.join(" AND ")) where('ghost IS NOT TRUE')
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