[3pts] Conditions - Forbidden TLDs
As a general administrator, I can create a new condition to forbid some extensions in links and allow all the others.A condition should have:
- A name
- A list of forbidden TLDs
Validation
- Given I create the condition forbidden TLDS with the name
Is Porn
and the forbidden Tlds.porn, .xyz
- Then the text
Hello, check this out: https://my-link.ch
does not trigger the condition
- Given I create the condition forbidden TLDS with the name
Is Porn
and the forbidden Tlds.porn, .xyz
- Then the text
Hello, check this out: https://my-link.xyz
triggers the condition
Tasks
-
Add the condition to the condition registry -
Display the condition in the condition table -
i18n for all the labels -
admin form Decidim::Form and partial view. -
admin form validation: check format. <point><name><comma>(<space>)<--->
-
admin form: get parsed csv -
command: isolates links in text -
command: foreach links, compare tlds with forbidden ones.
Edited by Renato