From d404d2f586645cfc6d334c3ef4e963b2fa1b9667 2009-12-23 18:08:39
From: Jean-Philippe Lang
Date: 2009-12-23 18:08:39
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
---
diff --git a/app/views/my/_sidebar.rhtml b/app/views/my/_sidebar.rhtml
index 1f511bd..ee3c8ab 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 55760f8..a3136f4 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) %>