From 1311b1500bc83c7b199fbccc10436253626dc8ab Mon Sep 17 00:00:00 2001 From: Hugo Melo Date: Mon, 2 Nov 2015 18:28:18 -0200 Subject: [PATCH] Hide gamification dashboard and its link. --- controllers/gamification_plugin_profile_controller.rb | 4 +++- views/gamification/display_notifications.html.erb | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/controllers/gamification_plugin_profile_controller.rb b/controllers/gamification_plugin_profile_controller.rb index 82e29a7..1b63607 100644 --- a/controllers/gamification_plugin_profile_controller.rb +++ b/controllers/gamification_plugin_profile_controller.rb @@ -2,7 +2,9 @@ class GamificationPluginProfileController < ProfileController def dashboard @target = profile - render 'gamification/dashboard' + # temporarily render not found + #render 'gamification/dashboard' + render_not_found unless user and user.is_admin? end end diff --git a/views/gamification/display_notifications.html.erb b/views/gamification/display_notifications.html.erb index af5aa28..1bf9785 100644 --- a/views/gamification/display_notifications.html.erb +++ b/views/gamification/display_notifications.html.erb @@ -1,6 +1,6 @@ <%= stylesheet_link_tag '/plugins/gamification/animate.css' %> -<%= link_to({:controller => 'gamification_plugin_profile', :action => :dashboard, :profile => current_person.identifier }, :class => 'gamification-plugin user-info-template', :style => 'display: none') do %> +<% link_to({:controller => 'gamification_plugin_profile', :action => :dashboard, :profile => current_person.identifier }, :class => 'gamification-plugin user-info-template', :style => 'display: none') do %>       @@ -9,6 +9,6 @@ -- libgit2 0.21.2