2018-12-13 13:39:08 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
module Gitlab
|
|
|
|
module GlId
|
|
|
|
def self.gl_id(user)
|
|
|
|
if user.present?
|
2018-10-15 14:42:47 +05:30
|
|
|
gl_id_from_id_value(user.id)
|
2016-06-16 23:09:34 +05:30
|
|
|
else
|
2018-10-15 14:42:47 +05:30
|
|
|
''
|
2016-06-16 23:09:34 +05:30
|
|
|
end
|
|
|
|
end
|
2018-10-15 14:42:47 +05:30
|
|
|
|
|
|
|
def self.gl_id_from_id_value(id)
|
|
|
|
"user-#{id}"
|
|
|
|
end
|
2016-06-16 23:09:34 +05:30
|
|
|
end
|
|
|
|
end
|