putting email verification back in

This commit is contained in:
Raphael 2010-08-17 16:43:54 -07:00
parent 188f555c72
commit 26a892ab4c

View file

@ -18,19 +18,19 @@ class User
many :groups, :class_name => 'Group' many :groups, :class_name => 'Group'
before_validation_on_create :setup_person before_validation_on_create :setup_person
#before_create :pivotal_only before_create :pivotal_or_diaspora_only
######## Making things work ######## ######## Making things work ########
key :email, String key :email, String
#validates_true_for :email, :logic => lambda {self.pivotal_email?} #validates_true_for :email, :logic => lambda {self.pivotal_email?}
def pivotal_email? def allowed_email?
email.include?('@pivotallabs.com') email.include?('@pivotallabs.com') || email.include("@joindiaspora.com")
end end
def pivotal_only def pivotal_or_diaspora_only
raise "pivotal only" unless pivotal_email? raise "pivotal only" unless allowed_email?
end end
def method_missing(method, *args) def method_missing(method, *args)