summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-28 20:14:21 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-28 20:14:21 +0000
commit2cc87591759f4626faa4a44f61f0ca54f8e47d71 (patch)
tree90da268c6f4cca0bbf2513910a1012e9db1437c4 /lib
parent2eaabae2520b9de37aa21c54d9ce373bf175cf81 (diff)
downloadredmine-2cc87591759f4626faa4a44f61f0ca54f8e47d71.tar.gz
redmine-2cc87591759f4626faa4a44f61f0ca54f8e47d71.zip
Display menu items if user is allowed.
git-svn-id: http://svn.redmine.org/redmine/trunk@16727 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/redmine.rb b/lib/redmine.rb
index 5f01787c2..0dda94e95 100644
--- a/lib/redmine.rb
+++ b/lib/redmine.rb
@@ -213,9 +213,10 @@ Redmine::MenuManager.map :application_menu do |menu|
menu.push :time_entries, {:controller => 'timelog', :action => 'index'},
:if => Proc.new {User.current.allowed_to?(:view_time_entries, nil, :global => true)},
:caption => :label_spent_time
- menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :caption => :label_gantt
- menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :caption => :label_calendar
-
+ menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :caption => :label_gantt,
+ :if => Proc.new {User.current.allowed_to?(:view_gantt, nil, :global => true)}
+ menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :caption => :label_calendar,
+ :if => Proc.new {User.current.allowed_to?(:view_calendar, nil, :global => true)}
menu.push :news, {:controller => 'news', :action => 'index'},
:if => Proc.new {User.current.allowed_to?(:view_news, nil, :global => true)},
:caption => :label_news_plural