summaryrefslogtreecommitdiffstats
path: root/app/views/my
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-23 18:08:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-23 18:08:39 +0000
commitd404d2f586645cfc6d334c3ef4e963b2fa1b9667 (patch)
tree28f0617b4b841bbcb13d61356ee872baceba7662 /app/views/my
parent682829a90474f863822138b66b173eb01f2cacc3 (diff)
downloadredmine-d404d2f586645cfc6d334c3ef4e963b2fa1b9667.tar.gz
redmine-d404d2f586645cfc6d334c3ef4e963b2fa1b9667.zip
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
Diffstat (limited to 'app/views/my')
-rw-r--r--app/views/my/_sidebar.rhtml2
-rw-r--r--app/views/my/account.rhtml2
2 files changed, 3 insertions, 1 deletions
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 %>)
</p>
+<% if Setting.rest_api_enabled? %>
<h4><%= l(:label_api_access_key) %></h4>
<p>
<% if @user.api_token %>
@@ -24,3 +25,4 @@
<% end %>
(<%= link_to l(:button_reset), {:action => 'reset_api_key'}, :method => :post %>)
</p>
+<% 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 %>
</div>
-<% if @user.api_token %>
+<% if Setting.rest_api_enabled? && @user.api_token %>
<h3><%=l(:label_api_access_key) %></h3>
<div class="box">
<p>