[Git][noosfero/noosfero][master] 2 commits: Handle ActiveRecord::RecordInvalid exceptions in remote user plugin

Antonio Terceiro gitlab at gitlab.com
Mon Jun 29 16:30:11 BRT 2015


Antonio Terceiro pushed to branch master at Noosfero / noosfero


Commits:
0b067cf1 by Arthur Del Esposte at 2015-06-26T21:49:25Z
Handle ActiveRecord::RecordInvalid exceptions in remote user plugin

- - - - -
1a854cf9 by Antonio Terceiro at 2015-06-29T19:29:54Z
Merge branch 'remote_user_fix' into 'master'

Handle ActiveRecord::RecordInvalid exceptions in remote user plugin

Fix #612

See merge request !616

- - - - -


1 changed file:

- plugins/remote_user/lib/remote_user_plugin.rb


Changes:

=====================================
plugins/remote_user/lib/remote_user_plugin.rb
=====================================
--- a/plugins/remote_user/lib/remote_user_plugin.rb
+++ b/plugins/remote_user/lib/remote_user_plugin.rb
@@ -48,8 +48,11 @@ class RemoteUserPlugin < Noosfero::Plugin
             end
           end
         end
+      rescue ::ActiveRecord::RecordInvalid
+        session[:notice] = _('Could not create the remote user.')
+        render_404
       rescue
-        session[:notice] = _('Could not create the remote_user.')
+        session[:notice] = _("Could not log in.")
         render_404
       end
     end



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/2cd9e2e5c6c1c6a108f261cb7d4d9bf070d0c6b4...1a854cf9062fad11a231e1730cca95913a4cb1da
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150629/a08809fc/attachment.html>


More information about the Noosfero-dev mailing list