Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/tokens.rake')
-rw-r--r--lib/tasks/tokens.rake9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/tasks/tokens.rake b/lib/tasks/tokens.rake
index 81e24f4f7b6..c974aebf503 100644
--- a/lib/tasks/tokens.rake
+++ b/lib/tasks/tokens.rake
@@ -31,6 +31,11 @@ class TmpUser < ActiveRecord::Base # rubocop:disable Rails/ApplicationRecord
self.table_name = 'users'
- add_authentication_token_field :incoming_email_token, token_generator: -> { SecureRandom.hex.to_i(16).to_s(36) }
- add_authentication_token_field :feed_token
+ add_authentication_token_field :incoming_email_token,
+ token_generator: -> { User.generate_incoming_mail_token }
+ add_authentication_token_field :feed_token, format_with_prefix: :prefix_for_feed_token
+
+ def prefix_for_feed_token
+ User::FEED_TOKEN_PREFIX
+ end
end