diff --git a/controllers/gamification_plugin_profile_controller.rb b/controllers/gamification_plugin_profile_controller.rb index 82e29a7..5740e25 100644 --- a/controllers/gamification_plugin_profile_controller.rb +++ b/controllers/gamification_plugin_profile_controller.rb @@ -2,7 +2,12 @@ class GamificationPluginProfileController < ProfileController def dashboard @target = profile - render 'gamification/dashboard' + # temporarily render not found + if (user and user.is_admin?) || user.environment.name != 'Juventude.gov.br' + render 'gamification/dashboard' + else + render_not_found + end end end diff --git a/lib/gamification_plugin.rb b/lib/gamification_plugin.rb index 6ce3237..6b8d338 100644 --- a/lib/gamification_plugin.rb +++ b/lib/gamification_plugin.rb @@ -35,7 +35,7 @@ class GamificationPlugin < Noosfero::Plugin def body_ending proc do - if current_person.present? && response.status == 200 + if current_person.present? && response.status == 200 && current_person.environment.name != 'Juventude.gov.br' badges = current_person.badges.notification_pending.all current_person.sash.notify_all_badges_from_user render :file => 'gamification/display_notifications', :locals => {:badges => badges} -- libgit2 0.21.2