From b0f5f734e102f663831de5d8ee9a91c8bf9f1ecd Mon Sep 17 00:00:00 2001 From: yanxd Date: Thu, 28 Nov 2013 17:25:09 +0800 Subject: [PATCH] e... little bug. --- .../acts_as_activity_provider/lib/acts_as_activity_provider.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb index 4c0a1c8a5..6e48ff4b7 100644 --- a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb +++ b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb @@ -103,7 +103,7 @@ module Redmine end if provider_options.has_key?(:permission) - user1 = User.find_by_login('user') + user1 = User.find_by_admin(true) scope = scope.scoped(:conditions => Project.allowed_to_condition(user1, provider_options[:permission] || :view_project, options)) elsif respond_to?(:visible) scope = scope.visible(user1, options)