mirror of
https://github.com/redmine/redmine.git
synced 2025-11-05 04:45:57 +01:00
Added project module concept.
A project module (eg. issue tracking, news, wiki,...) is a set of permissions that can enabled/disabled at project level.
For each project, modules can be enabled on the project settings view ('Modules' tab).
This requires a specific permission: 'Select project modules' (if this permission is turned off, only Redmine administrators can choose which modules a project uses).
When applying this migration, all modules are enabled for all existing projects.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@725 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -31,8 +31,8 @@ module Redmine
|
||||
@items[menu_name.to_sym] || []
|
||||
end
|
||||
|
||||
def allowed_items(menu_name, role)
|
||||
items(menu_name).select {|item| role && role.allowed_to?(item.url)}
|
||||
def allowed_items(menu_name, user, project)
|
||||
items(menu_name).select {|item| user && user.allowed_to?(item.url, project)}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user