Project

General

Profile

Defect #5589 » include_subproject_event_types_in_activity_fetcher.patch

Adds the event types available in the project's subprojects - Felix Schäfer, 2010-07-01 16:19

View differences:

lib/redmine/activity/fetcher.rb
38 38
        return @event_types unless @event_types.nil?
39 39
        
40 40
        @event_types = Redmine::Activity.available_event_types
41
        @event_types = @event_types.select {|o| @user.allowed_to?("view_#{o}".to_sym, @project)} if @project
41
        @event_types = @event_types.select {|o| @project.self_and_descendants.detect {|p| @user.allowed_to?("view_#{o}".to_sym, p)}} if @project
42 42
        @event_types
43 43
      end
44 44
      
    (1-1/1)