Skip to content

Commit

Permalink
fix policy for next_stage and the start_next_stage margin
Browse files Browse the repository at this point in the history
  • Loading branch information
JeSuisUnCaillou committed Jan 15, 2025
1 parent 29ea9b8 commit c789e4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/policies/authorization_request_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def transfer?
end

def start_next_stage?
record.definition.next_stage? &&
same_user_and_organization? &&
record.definition.next_stage? &&
record.validated?
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/authorization_request_forms/summary.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<div class="fr-col-12">
<ul class="fr-btns-group fr-btns-group--inline fr-btns-group--icon-left fr-btns-group--between">
<li class="fr-ml-auto">
<%= link_to t('authorization_request_forms.form.start_next_stage'), next_authorization_request_stage_path(@authorization_request), class: %w(fr-btn) %>
<%= link_to t('authorization_request_forms.form.start_next_stage'), next_authorization_request_stage_path(@authorization_request), class: %w(fr-btn fr-mb-0) %>
</li>
</ul>
</div>
Expand Down

0 comments on commit c789e4d

Please sign in to comment.