Merge branch 'release/4.3' into dev

pull/6827/head
Oliver Günther 9 years ago
commit 1dd0385669
  1. 2
      .rubocop.yml
  2. 12
      lib/open_project/reporting/engine.rb

@ -1,6 +1,6 @@
AllCops:
Exclude:
- *.gemspec
- '*.gemspec'
AccessorMethodName:
Enabled: false

@ -48,11 +48,13 @@ module OpenProject::Reporting
menu :top_menu, :cost_reports_global, {controller: '/cost_reports', action: 'index', project_id: nil},
caption: :cost_reports_title,
if: Proc.new {
( User.current.allowed_to?(:view_time_entries, nil, global: true) ||
User.current.allowed_to?(:view_own_time_entries, nil, global: true) ||
User.current.allowed_to?(:view_cost_entries, nil, global: true) ||
User.current.allowed_to?(:view_own_cost_entries, nil, global: true)
)
(User.current.logged? || !Setting.login_required?) &&
(
User.current.allowed_to?(:view_time_entries, nil, global: true) ||
User.current.allowed_to?(:view_own_time_entries, nil, global: true) ||
User.current.allowed_to?(:view_cost_entries, nil, global: true) ||
User.current.allowed_to?(:view_own_cost_entries, nil, global: true)
)
}
menu :project_menu, :cost_reports,

Loading…
Cancel
Save