[5pt] Conditions - Allowed TLDs
As a general administrator, I can create a new condition to allow some extensions in links and forbid all the others.A condition should have:
- A name
- A list of allowed TLDs
Validation
- Given I create the condition allowed TLDS with the name
Is Swiss
and the allowed Tlds.ch, .swiss
- Then the text
Hello, check this out: https://my-link.ch
does not trigger the condition
- Given I create the condition allowed TLDS with the name
Is Swiss
and the allowed Tlds.ch, .swiss
- Then the text
Hello, check this out: https://my-link.fr
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 allowed ones - [ ]
Edited by Renato