Commit 0efa1fd3 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

fix validation of user emails allowed to create apps

parent 2fe97cea
......@@ -36,8 +36,8 @@ class User < ActiveRecord::Base
## we use it to check that an user is @inria or @irisa to create an app
# FIXME: the method name should be much more explicit
def self.valid_email(u_email)
t = u_email.split("@").last
return (t == Rails.application.config.restrict_email[0] || t == Rails.application.config.restrict_email[1])
domain = u_email.split("@").last
Rails.application.config.restrict_email.include? domain
def set_auth_token
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