From b9826c1e4c93d830ecc6415f491709f82860dab8 Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Thu, 6 Aug 2015 19:29:50 -0300 Subject: [PATCH] see only by environment admin --- controllers/myprofile/dialoga_plugin_myprofile_controller.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/controllers/myprofile/dialoga_plugin_myprofile_controller.rb b/controllers/myprofile/dialoga_plugin_myprofile_controller.rb index 27788fc..67f0eb3 100644 --- a/controllers/myprofile/dialoga_plugin_myprofile_controller.rb +++ b/controllers/myprofile/dialoga_plugin_myprofile_controller.rb @@ -1,6 +1,6 @@ class DialogaPluginMyprofileController < MyProfileController - protect 'perform_task', :profile + before_filter :is_admin def send_report path = File.join(Rails.root,'plugins','dialoga','script') @@ -13,4 +13,10 @@ class DialogaPluginMyprofileController < MyProfileController redirect_to :back end + protected + def is_admin + render_access_denied unless current_person.is_admin? + end + + end -- libgit2 0.21.2