Project

General

Profile

Feature #6153 » calendar_and_gantt_as_modules.diff

Adam Soltys, 2010-08-19 07:12

View differences:

config/settings.yml
150 150
  - wiki
151 151
  - repository
152 152
  - boards
153
  - calendar
154
  - gantt
153 155
# Role given to a non-admin user who creates a project
154 156
new_project_user_role_id:
155 157
  format: int
lib/redmine.rb
75 75
    # Queries
76 76
    map.permission :manage_public_queries, {:queries => [:new, :edit, :destroy]}, :require => :member
77 77
    map.permission :save_queries, {:queries => [:new, :edit, :destroy]}, :require => :loggedin
78
    # Gantt & calendar
79
    map.permission :view_gantt, :gantts => :show
80
    map.permission :view_calendar, :calendars => :show
81 78
    # Watchers
82 79
    map.permission :view_issue_watchers, {}
83 80
    map.permission :add_issue_watchers, {:watchers => :new}
......
136 133
    map.permission :delete_messages, {:messages => :destroy}, :require => :member
137 134
    map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin
138 135
  end
136

  
137
  map.project_module :calendar do |map|
138
    map.permission :view_calendar, :calendars => :show
139
  end
140

  
141
  map.project_module :gantt do |map|
142
    map.permission :view_gantt, :gantts => :show
143
  end
139 144
end
140 145

  
141 146
Redmine::MenuManager.map :top_menu do |menu|
test/fixtures/enabled_modules.yml
63 63
  name: boards
64 64
  project_id: 2
65 65
  id: 16
66
enabled_modules_017: 
67
  name: calendar
68
  project_id: 1
69
  id: 17
70
enabled_modules_018: 
71
  name: gantt 
72
  project_id: 1
73
  id: 18
74
enabled_modules_019: 
75
  name: calendar
76
  project_id: 2
77
  id: 19
78
enabled_modules_020: 
79
  name: gantt 
80
  project_id: 2
81
  id: 20
82
enabled_modules_021: 
83
  name: calendar
84
  project_id: 3
85
  id: 21
86
enabled_modules_022: 
87
  name: gantt
88
  project_id: 3
89
  id: 22
90
enabled_modules_023: 
91
  name: calendar
92
  project_id: 5
93
  id: 23
94
enabled_modules_024: 
95
  name: gantt 
96
  project_id: 5
97
  id: 24
test/unit/lib/redmine_test.rb
62 62
  end
63 63

  
64 64
  def test_project_menu
65
    assert_number_of_items_in_menu :project_menu, 12
65
    assert_number_of_items_in_menu :project_menu, 14
66 66
    assert_menu_contains_item_named :project_menu, :overview
67 67
    assert_menu_contains_item_named :project_menu, :activity
68 68
    assert_menu_contains_item_named :project_menu, :roadmap
69 69
    assert_menu_contains_item_named :project_menu, :issues
70 70
    assert_menu_contains_item_named :project_menu, :new_issue
71
    assert_menu_contains_item_named :project_menu, :calendar
72
    assert_menu_contains_item_named :project_menu, :gantt
71 73
    assert_menu_contains_item_named :project_menu, :news
72 74
    assert_menu_contains_item_named :project_menu, :documents
73 75
    assert_menu_contains_item_named :project_menu, :wiki
(1-1/2)