use method instead of reprogramming it

pull/4778/head
Jens Ulferts 8 years ago
parent 8c827bbbec
commit db7bd7e591
  1. 2
      app/models/user/project_authorization_cache.rb

@ -36,7 +36,7 @@ class User::ProjectAuthorizationCache
def cache(actions)
Array(actions).each do |action|
allowed_project_ids = Project.where(Project.allowed_to_condition(user, action)).pluck(:id)
allowed_project_ids = Project.allowed_to(user, action).pluck(:id)
projects_by_actions[normalized_permission_name(action)] = allowed_project_ids
end

Loading…
Cancel
Save