From 9cdd8bf039c78017ff80283ef76c2f45783ec987 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sun, 16 Jun 2019 09:34:49 +0000 Subject: Enables API access to /my/account for updating user account data (#31399). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@18257 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/my/account.api.rsb | 13 +++++++++++++ app/views/my/account.html.erb | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 app/views/my/account.api.rsb (limited to 'app/views/my') diff --git a/app/views/my/account.api.rsb b/app/views/my/account.api.rsb new file mode 100644 index 000000000..c1cac2bbe --- /dev/null +++ b/app/views/my/account.api.rsb @@ -0,0 +1,13 @@ +api.user do + api.id @user.id + api.login @user.login + api.admin @user.admin? + api.firstname @user.firstname + api.lastname @user.lastname + api.mail @user.mail + api.created_on @user.created_on + api.last_login_on @user.last_login_on + api.api_key @user.api_key + + render_api_custom_values @user.visible_custom_field_values, api +end diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 63402c977..87b2d7cbd 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -14,7 +14,7 @@ <%= labelled_form_for :user, @user, :url => { :action => "account" }, :html => { :id => 'my_account_form', - :method => :post, :multipart => true } do |f| %> + :method => :put, :multipart => true } do |f| %>
-- cgit v1.2.3