fix MATCH_EXACT not working as intended

This commit is contained in:
Jens Langhammer 2019-03-08 21:20:38 +01:00
parent 11ecdc4fcf
commit a7eaa74191
1 changed files with 2 additions and 0 deletions

View File

@ -288,6 +288,8 @@ class FieldMatcherPolicy(Policy):
if self.match_action == FieldMatcherPolicy.MATCH_REGEXP:
pattern = re.compile(self.value)
passes = bool(pattern.match(user_field_value))
if self.match_action == FieldMatcherPolicy.MATCH_EXACT:
passes = user_field_value == self.value
LOGGER.debug("User got '%r'", passes)
return passes