From 49fbc9324f9e44c3caca76b8fad02971b38e54b8 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Tue, 17 Dec 2024 14:36:26 +0100 Subject: [PATCH] fix: an invite can not submit a fork (UI side) --- app/components/dossiers/edit_footer_component.rb | 2 +- spec/system/users/invite_spec.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/components/dossiers/edit_footer_component.rb b/app/components/dossiers/edit_footer_component.rb index 13f204d8d..4ac97ef79 100644 --- a/app/components/dossiers/edit_footer_component.rb +++ b/app/components/dossiers/edit_footer_component.rb @@ -27,7 +27,7 @@ class Dossiers::EditFooterComponent < ApplicationComponent end def can_submit_en_construction? - forked_with_changes? + forked_with_changes? && owner? end def submit_button_label diff --git a/spec/system/users/invite_spec.rb b/spec/system/users/invite_spec.rb index 4caa306ca..37c7789e6 100644 --- a/spec/system/users/invite_spec.rb +++ b/spec/system/users/invite_spec.rb @@ -136,7 +136,6 @@ describe 'Invitations' do expect(page).to have_current_path(dossier_path(invite.dossier)) end - it_behaves_like 'the user can edit the submitted demande' it_behaves_like 'the user can send messages to the instructeur' end end