comparison lib/redmine/access_control.rb @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents e248c7af89ec
children
comparison
equal deleted inserted replaced
1516:b450a9d58aed 1517:dffacf8a6908
58 if action.is_a?(Symbol) 58 if action.is_a?(Symbol)
59 perm = permission(action) 59 perm = permission(action)
60 !perm.nil? && perm.read? 60 !perm.nil? && perm.read?
61 else 61 else
62 s = "#{action[:controller]}/#{action[:action]}" 62 s = "#{action[:controller]}/#{action[:action]}"
63 permissions.detect {|p| p.actions.include?(s) && !p.read?}.nil? 63 permissions.detect {|p| p.actions.include?(s) && p.read?}.present?
64 end 64 end
65 end 65 end
66 66
67 def available_project_modules 67 def available_project_modules
68 @available_project_modules ||= @permissions.collect(&:project_module).uniq.compact 68 @available_project_modules ||= @permissions.collect(&:project_module).uniq.compact