Commit cba3a1f5 authored by jplang's avatar jplang

Display menu items if user is allowed.

git-svn-id: https://svn.redmine.org/redmine/trunk@16727 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent b0bb0700
...@@ -213,9 +213,10 @@ Redmine::MenuManager.map :application_menu do |menu| ...@@ -213,9 +213,10 @@ Redmine::MenuManager.map :application_menu do |menu|
menu.push :time_entries, {:controller => 'timelog', :action => 'index'}, menu.push :time_entries, {:controller => 'timelog', :action => 'index'},
:if => Proc.new {User.current.allowed_to?(:view_time_entries, nil, :global => true)}, :if => Proc.new {User.current.allowed_to?(:view_time_entries, nil, :global => true)},
:caption => :label_spent_time :caption => :label_spent_time
menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :caption => :label_gantt menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :caption => :label_gantt,
menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :caption => :label_calendar :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'}, menu.push :news, {:controller => 'news', :action => 'index'},
:if => Proc.new {User.current.allowed_to?(:view_news, nil, :global => true)}, :if => Proc.new {User.current.allowed_to?(:view_news, nil, :global => true)},
:caption => :label_news_plural :caption => :label_news_plural
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment