Skip to content

Commit de86828

Browse files
only allow qualified teams to submit projects
1 parent f289fdc commit de86828

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/hacker_dashboard_portal/app/policies/hacker_dashboard_portal/hackathon/team_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def invite_member?
1919
end
2020

2121
def submit_project?
22-
user.owns_team?(record) && record.project_submission.nil?
22+
record.qualified? && user.owns_team?(record) && record.project_submission.nil?
2323
end
2424

2525
def edit_project?

packages/hacker_dashboard_portal/app/views/hacker_dashboard_portal/dashboard/_team_dashboard.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</div>
1818

1919
<!-- Project Submission Call to Action -->
20-
<% if team.project_submission.blank? && allowed_to?(:submit_project?, team) %>
20+
<% if allowed_to?(:submit_project?, team) %>
2121
<div class="bg-gradient-to-r from-green-50 to-emerald-50 dark:from-green-900/20 dark:to-emerald-900/20 rounded-xl shadow-md p-6 mb-6 border-2 border-green-200 dark:border-green-800">
2222
<div class="flex items-start gap-4">
2323
<div class="flex-shrink-0">

0 commit comments

Comments
 (0)