From d404d2f586645cfc6d334c3ef4e963b2fa1b9667 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 23 Dec 2009 18:08:39 +0000 Subject: [PATCH] Do not display API key if API is disabled. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3224 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/my/_sidebar.rhtml | 2 ++ app/views/my/account.rhtml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/my/_sidebar.rhtml b/app/views/my/_sidebar.rhtml index 1f511bdd2..ee3c8abdc 100644 --- a/app/views/my/_sidebar.rhtml +++ b/app/views/my/_sidebar.rhtml @@ -15,6 +15,7 @@ (<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>)

+<% if Setting.rest_api_enabled? %>

<%= l(:label_api_access_key) %>

<% if @user.api_token %> @@ -24,3 +25,4 @@ <% end %> (<%= link_to l(:button_reset), {:action => 'reset_api_key'}, :method => :post %>)

+<% end %> diff --git a/app/views/my/account.rhtml b/app/views/my/account.rhtml index 55760f8d1..a3136f4cd 100644 --- a/app/views/my/account.rhtml +++ b/app/views/my/account.rhtml @@ -52,7 +52,7 @@ <% end %> -<% if @user.api_token %> +<% if Setting.rest_api_enabled? && @user.api_token %>

<%=l(:label_api_access_key) %>

-- 2.39.5