Skip to content

Commit

Permalink
Need to implement this method to allow others api who does not have f…
Browse files Browse the repository at this point in the history
…rance connect to use modalities block
  • Loading branch information
Isalafont committed Jan 22, 2025
1 parent dc0a123 commit 1feace5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions app/models/concerns/authorization_extensions/modalities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ def available_modalities
def mandatory_modalities?
false
end

def with_france_connect?
modalities.include? 'with_france_connect'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ def associated_france_connect_authorization
Authorization.find(france_connect_authorization_id)
end

def with_france_connect?
modalities.include? 'with_france_connect'
end

def remove_france_connect_authorization_if_not_with_france_connect
self.france_connect_authorization_id = nil unless with_france_connect?
end
Expand Down

0 comments on commit 1feace5

Please sign in to comment.