From 8a2e4aa247f2a02537eb990ed8f32dd9a6f21e56 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Mon, 28 Oct 2019 14:02:25 +0000 Subject: Add permission to import time entries (#32196, #28234). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18878 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/time_entry_import.rb | 2 +- app/views/timelog/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/models/time_entry_import.rb b/app/models/time_entry_import.rb index 125eee093..66b762f74 100644 --- a/app/models/time_entry_import.rb +++ b/app/models/time_entry_import.rb @@ -23,7 +23,7 @@ class TimeEntryImport < Import end def self.authorized?(user) - user.allowed_to?(:log_time, nil, :global => true) + user.allowed_to?(:import_time_entries, nil, :global => true) end # Returns the objects that were imported diff --git a/app/views/timelog/index.html.erb b/app/views/timelog/index.html.erb index 2de121806..e33855cd8 100644 --- a/app/views/timelog/index.html.erb +++ b/app/views/timelog/index.html.erb @@ -6,7 +6,7 @@ {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'}, :class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %> <%= actions_dropdown do %> - <% if User.current.allowed_to?(:log_time, @project, :global => true) %> + <% if User.current.allowed_to?(:import_time_entries, @project, :global => true) %> <%= link_to l(:button_import), new_time_entries_import_path %> <% end %> <% end %> -- cgit v1.2.3