myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2333] trunk: bug fix and made email veracity che


From: noreply
Subject: [myexperiment-hackers] [2333] trunk: bug fix and made email veracity checking optional as it requires network access
Date: Fri, 12 Feb 2010 04:58:38 -0500 (EST)

Revision
2333
Author
dgc
Date
2010-02-12 04:58:37 -0500 (Fri, 12 Feb 2010)

Log Message

bug fix and made email veracity checking optional as it requires network access

Modified Paths

Diff

Modified: trunk/app/controllers/workflows_controller.rb (2332 => 2333)


--- trunk/app/controllers/workflows_controller.rb	2010-02-11 15:56:30 UTC (rev 2332)
+++ trunk/app/controllers/workflows_controller.rb	2010-02-12 09:58:37 UTC (rev 2333)
@@ -155,7 +155,7 @@
     end
 
     @workflow.reload
-    @workflow.solr_save
+    @workflow.solr_save if Conf.solr_enable
   end
   
   # GET /workflows/1;download
@@ -304,7 +304,7 @@
         if params[:workflow][:tag_list]
           @workflow.refresh_tags(convert_tags_to_gem_format(params[:workflow][:tag_list]), current_user)
           @workflow.reload
-          @workflow.solr_save
+          @workflow.solr_save if Conf.solr_enable
         end
         
         policy_err_msg = update_policy(@workflow, params)
@@ -458,7 +458,7 @@
         if params[:workflow][:tag_list]
           @workflow.refresh_tags(convert_tags_to_gem_format(params[:workflow][:tag_list]), current_user)
           @workflow.reload
-          @workflow.solr_save
+          @workflow.solr_save if Conf.solr_enable
         end
 
         policy_err_msg = update_policy(@workflow, params)

Modified: trunk/app/models/profile.rb (2332 => 2333)


--- trunk/app/models/profile.rb	2010-02-11 15:56:30 UTC (rev 2332)
+++ trunk/app/models/profile.rb	2010-02-12 09:58:37 UTC (rev 2333)
@@ -35,7 +35,7 @@
   
   belongs_to :picture
   
-  validates_email_veracity_of :email
+  validates_email_veracity_of :email if Conf.validate_email_veracity
 
   acts_as_site_entity :owner_text => 'User'
   

Modified: trunk/app/models/user.rb (2332 => 2333)


--- trunk/app/models/user.rb	2010-02-11 15:56:30 UTC (rev 2332)
+++ trunk/app/models/user.rb	2010-02-12 09:58:37 UTC (rev 2333)
@@ -132,8 +132,10 @@
   validates_presence_of     :openid_url, :if => Proc.new { |user| !user.openid_url.nil? }
   validates_uniqueness_of   :openid_url, :if => Proc.new { |user| !user.openid_url.nil? }
   
-  validates_email_veracity_of :email
-  validates_email_veracity_of :unconfirmed_email
+  if Conf.validate_email_veracity
+    validates_email_veracity_of :email
+    validates_email_veracity_of :unconfirmed_email
+  end
   
   before_validation :cleanup_input
   before_save :check_email_uniqueness

Modified: trunk/config/default_settings.yml (2332 => 2333)


--- trunk/config/default_settings.yml	2010-02-11 15:56:30 UTC (rev 2332)
+++ trunk/config/default_settings.yml	2010-02-12 09:58:37 UTC (rev 2333)
@@ -245,6 +245,13 @@
 
 feedback_email_address: address@hidden
 
+# validate_email_veracity - This enables some checks on the validity of email
+#                           addresses that are provided by users.  It is
+#                           configurable since it requires network activity to
+#                           operate.
+
+validate_email_veracity: false
+
 # model_aliases - These are visible names for models where the desired visible
 #                 name might conflict with existing classes (e.g. "File" or
 #                 "Application")

Modified: trunk/lib/conf.rb (2332 => 2333)


--- trunk/lib/conf.rb	2010-02-11 15:56:30 UTC (rev 2332)
+++ trunk/lib/conf.rb	2010-02-12 09:58:37 UTC (rev 2333)
@@ -130,6 +130,10 @@
     self.fetch_entry('stylesheet')
   end
 
+  def self.validate_email_veracity
+    self.fetch_entry('validate_email_veracity')
+  end
+
   # This method is required to create an administrator in the test fixtures
 
   def self.admins=(value)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]