mirror of
				https://github.com/redmine/redmine.git
				synced 2025-11-03 20:06:24 +01:00 
			
		
		
		
	Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18878 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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 %>
 | 
			
		||||
 
 | 
			
		||||
@@ -132,6 +132,7 @@ Redmine::AccessControl.map do |map|
 | 
			
		||||
    map.permission :edit_own_time_entries, {:timelog => [:edit, :update, :destroy,:bulk_edit, :bulk_update]}, :require => :loggedin
 | 
			
		||||
    map.permission :manage_project_activities, {:projects => :settings, :project_enumerations => [:update, :destroy]}, :require => :member
 | 
			
		||||
    map.permission :log_time_for_other_users, :require => :member
 | 
			
		||||
    map.permission :import_time_entries, {}
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  map.project_module :news do |map|
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								test/fixtures/roles.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								test/fixtures/roles.yml
									
									
									
									
										vendored
									
									
								
							@@ -36,6 +36,7 @@ roles_001:
 | 
			
		||||
    - :view_time_entries
 | 
			
		||||
    - :edit_time_entries
 | 
			
		||||
    - :delete_time_entries
 | 
			
		||||
    - :import_time_entries
 | 
			
		||||
    - :view_news
 | 
			
		||||
    - :manage_news
 | 
			
		||||
    - :comment_news
 | 
			
		||||
@@ -215,4 +216,3 @@ roles_005:
 | 
			
		||||
    - :view_changesets
 | 
			
		||||
 | 
			
		||||
  position: 1
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user