Skip to content

Commit

Permalink
ensure users have permission to view cards
Browse files Browse the repository at this point in the history
  • Loading branch information
MattBudz committed Sep 23, 2024
1 parent 18e2d53 commit 6425e54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/helpers/tasks_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def assigned_cards(project_id = nil)
if project_id
cards.select { |card| card.project.id == current_project.id }
else
cards
valid_project_ids = Project.kept.current.accessible_by(current_ability).ids
cards.select { |card| card.project.id.in? valid_project_ids }
end
end
end
Expand Down

0 comments on commit 6425e54

Please sign in to comment.