summaryrefslogtreecommitdiff
path: root/users/app/views
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-09-23 19:55:22 +0200
committerAzul <azul@leap.se>2013-09-24 10:48:32 +0200
commit193bf6446b384dce1699e8fb82be6f16cb8cb5f6 (patch)
treefb4ed9b5a383a04c491ea0d1a54a413117028f24 /users/app/views
parent98db0cc42019dfcd90d58e0126fe691590fde2e2 (diff)
use token auth when accessing the api from webapp
One failing integration test still needs to be fixed
Diffstat (limited to 'users/app/views')
-rw-r--r--users/app/views/users/_edit.html.haml5
1 files changed, 3 insertions, 2 deletions
diff --git a/users/app/views/users/_edit.html.haml b/users/app/views/users/_edit.html.haml
index 5f74d32..ae3f32d 100644
--- a/users/app/views/users/_edit.html.haml
+++ b/users/app/views/users/_edit.html.haml
@@ -10,7 +10,8 @@
-# however, we don't want the user to change their login without generating a new key, so we hide the ui for this
-# (although it works perfectly fine to change username if the field was visible).
-#
-- form_options = {:url => '/not-used', :html => {:class => user_form_class('form-horizontal'), :id => 'update_login_and_password'}, :validate => true}
+
+- form_options = {:url => '/not-used', :html => {:class => user_form_class('form-horizontal'), :id => 'update_login_and_password', :data => {token: session[:token]}}, :validate => true}
= simple_form_for @user, form_options do |f|
%legend= t(:change_password)
= hidden_field_tag 'user_param', @user.to_param
@@ -28,7 +29,7 @@
-# this will be replaced by a identities controller/view at some point
-#
-- form_options = {:html => {:class => user_form_class('form-horizontal'), :id => 'update_pgp_key'}, :validate => true}
+- form_options = {:html => {:class => user_form_class('form-horizontal'), :id => 'update_pgp_key', :data => {token: session[:token]}}, :validate => true}
= simple_form_for [:api, @user], form_options do |f|
%legend= t(:advanced_options)
= f.input :public_key, :as => :text, :hint => t(:use_ascii_key), :input_html => {:class => "full-width", :rows => 4}