Removed edit_rate permission, only Administrators can edti rates. #2031
This commit is contained in:
@@ -17,5 +17,4 @@ Redmine::Plugin.register :redmine_rate do
|
||||
requires_redmine :version_or_higher => '0.8.0'
|
||||
|
||||
permission :view_rate, { }
|
||||
permission :edit_rate, { }
|
||||
end
|
||||
|
||||
@@ -37,7 +37,7 @@ class RateProjectHook < Redmine::Hook::ViewListener
|
||||
content << "<em>#{number_to_currency(rate.amount)}</em> "
|
||||
end
|
||||
|
||||
if (User.current.allowed_to?(:edit_rate, project) || User.current.admin?)
|
||||
if (User.current.admin?)
|
||||
|
||||
url = {
|
||||
:controller => 'rates',
|
||||
@@ -66,7 +66,7 @@ class RateProjectHook < Redmine::Hook::ViewListener
|
||||
content << form
|
||||
end
|
||||
else
|
||||
if (User.current.allowed_to?(:edit_rate, project) || User.current.admin?)
|
||||
if (User.current.admin?)
|
||||
|
||||
content << content_tag(:strong, link_to(number_to_currency(rate.amount), {
|
||||
:controller => 'users',
|
||||
|
||||
Reference in New Issue
Block a user