From bc05eca7cc4743a2ee331c1e2fb9ec2c68566c23 Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Wed, 11 Dec 2013 11:58:08 +0800 Subject: [PATCH] Fixed import data controller to work for admin and user only --- app/controllers/admin/import_data_controller.rb | 2 ++ .../app/views/panel/personal_journal/plugin/_profile.html.erb | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/import_data_controller.rb b/app/controllers/admin/import_data_controller.rb index 7ae3b265..68a4b859 100644 --- a/app/controllers/admin/import_data_controller.rb +++ b/app/controllers/admin/import_data_controller.rb @@ -6,6 +6,8 @@ require 'open-uri' class Admin::ImportDataController < OrbitBackendController # helper Admin::PagePartsHelper # include Admin::FrontendWidgetInterface + open_for_user + open_for_admin def get_teacher_data uri = URI("https://localhost:8000/teachers.xml") diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb index 3813ce3d..19c1f9b2 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb @@ -77,7 +77,6 @@ -<% if is_admin? %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_journal_paper_data_path(:user_id => @user.id), :class => 'btn btn-primary' %> @@ -88,7 +87,6 @@ <%= paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
-<% end %>