From 7c92da0720440eb8f54b26d7bda7df054d922149 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 26 Jan 2009 15:04:33 -0800 Subject: [PATCH] Removed edit_rate permission, only Administrators can edti rates. #2031 --- init.rb | 1 - lib/rate_project_hook.rb | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/init.rb b/init.rb index 0999017..eab5d0a 100644 --- a/init.rb +++ b/init.rb @@ -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 diff --git a/lib/rate_project_hook.rb b/lib/rate_project_hook.rb index ad968e7..1813f28 100644 --- a/lib/rate_project_hook.rb +++ b/lib/rate_project_hook.rb @@ -37,7 +37,7 @@ class RateProjectHook < Redmine::Hook::ViewListener content << "#{number_to_currency(rate.amount)} " 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',