Commit 6e435594 authored by Krasimir Angelov's avatar Krasimir Angelov

Change feature flags client token to (optional) encrypted

and update the scope for finding by project and token.
parent 36932a29
......@@ -11,7 +11,7 @@ module Operations
validates :project, presence: true
validates :token, presence: true
add_authentication_token_field :token
add_authentication_token_field :token, encrypted: :optional
before_validation :ensure_token!
......@@ -19,7 +19,7 @@ module Operations
return unless project
return unless token
find_by(token: token, project: project)
where(project_id: project).find_by_token(token)
end
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