summaryrefslogtreecommitdiff
path: root/users/app/controllers/email_settings_controller.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-07-19 13:06:57 +0200
committerAzul <azul@leap.se>2013-07-24 10:56:45 +0200
commitc0527cc18788fc60180d9293a546c93e6a77b788 (patch)
tree73c04ded5655764c99f63c919bef6d9bbb8b613c /users/app/controllers/email_settings_controller.rb
parentc0b88d9e8fe574d6164f48211db50f3b8a4c4d93 (diff)
removed email settings controller and views
PGP setting has been moved into account settings. It's using the API now issueing an Ajax request without any visual feedback. This obviously is not what we want but it hopefully suffices for uploading gpg keys for testing purposes before the Identity UI is in place.
Diffstat (limited to 'users/app/controllers/email_settings_controller.rb')
-rw-r--r--users/app/controllers/email_settings_controller.rb41
1 files changed, 0 insertions, 41 deletions
diff --git a/users/app/controllers/email_settings_controller.rb b/users/app/controllers/email_settings_controller.rb
deleted file mode 100644
index f7d85be..0000000
--- a/users/app/controllers/email_settings_controller.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-class EmailSettingsController < UsersBaseController
-
- before_filter :authorize
- before_filter :fetch_user
-
- def edit
- @email_alias = LocalEmail.new
- end
-
- def update
- @user.attributes = cleanup_params(params[:user])
- if @user.changed?
- if @user.save
- flash[:notice] = t(:changes_saved)
- redirect
- else
- if @user.email_aliases.last && !@user.email_aliases.last.valid?
- # display bad alias in text field:
- @email_alias = @user.email_aliases.pop
- end
- render 'email_settings/edit'
- end
- else
- redirect
- end
- end
-
- private
-
- def redirect
- redirect_to edit_user_email_settings_url(@user)
- end
-
- def cleanup_params(user)
- if !user['email_forward'].nil? && user['email_forward'].empty?
- user.delete('email_forward') # don't allow "" as an email forward
- end
- user
- end
-
-end