Fixed: cross-project issue list should not show issues of projects for which the issue tracking module was disabled.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1907 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2008-09-25 18:51:03 +00:00
1 parent 21979cf68a
commit 394fc9c109
6 files changed
+88 -2

No files matched your search

+9 -1
View File
@@ -30,8 +30,15 @@ module Redmine
@permissions
end
# Returns the permission of given name or nil if it wasn't found
# Argument should be a symbol
def permission(name)
permissions.detect {|p| p.name == name}
end
# Returns the actions that are allowed by the permission of given name
def allowed_actions(permission_name)
perm = @permissions.detect {|p| p.name == permission_name}
perm = permission(permission_name)
perm ? perm.actions : []
end
@@ -94,6 +101,7 @@ module Redmine
@actions << "#{controller}/#{actions}"
end
end
@actions.flatten!
end
def public?