forked from wallabag/wallabag
Add new Helper to process Ignore Origin rules and RulerZ operator
This commits adds a new helper like RuleBasedTagger for processing ignore origin rules. It also adds a new custom RulerZ operator for the '~' pattern matching rule. Renames 'pattern' with '_all' in IgnoreOriginRule entity. Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
@ -11,7 +11,6 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository")
|
||||
* @ORM\Table(name="`ignore_origin_instance_rule`")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class IgnoreOriginInstanceRule implements IgnoreOriginRuleInterface, RuleInterface
|
||||
{
|
||||
@ -30,7 +29,7 @@ class IgnoreOriginInstanceRule implements IgnoreOriginRuleInterface, RuleInterfa
|
||||
* @Assert\NotBlank()
|
||||
* @Assert\Length(max=255)
|
||||
* @RulerZAssert\ValidRule(
|
||||
* allowed_variables={"host","pattern"},
|
||||
* allowed_variables={"host","_all"},
|
||||
* allowed_operators={"=","~"}
|
||||
* )
|
||||
* @ORM\Column(name="rule", type="string", nullable=false)
|
||||
|
||||
@ -11,7 +11,6 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\IgnoreOriginUserRuleRepository")
|
||||
* @ORM\Table(name="`ignore_origin_user_rule`")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class IgnoreOriginUserRule implements IgnoreOriginRuleInterface, RuleInterface
|
||||
{
|
||||
@ -30,7 +29,7 @@ class IgnoreOriginUserRule implements IgnoreOriginRuleInterface, RuleInterface
|
||||
* @Assert\NotBlank()
|
||||
* @Assert\Length(max=255)
|
||||
* @RulerZAssert\ValidRule(
|
||||
* allowed_variables={"host","pattern"},
|
||||
* allowed_variables={"host","_all"},
|
||||
* allowed_operators={"=","~"}
|
||||
* )
|
||||
* @ORM\Column(name="rule", type="string", nullable=false)
|
||||
|
||||
Reference in New Issue
Block a user