mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-25 16:03:48 +00:00
18 lines
259 B
Ruby
18 lines
259 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module GlId
|
|
def self.gl_id(user)
|
|
if user.present?
|
|
gl_id_from_id_value(user.id)
|
|
else
|
|
''
|
|
end
|
|
end
|
|
|
|
def self.gl_id_from_id_value(id)
|
|
"user-#{id}"
|
|
end
|
|
end
|
|
end
|