core: make FieldMatcherRule’s user_field into dropdown

This commit is contained in:
Jens Langhammer
2018-12-10 11:15:53 +01:00
parent 19a8ecb55a
commit 633660c602
4 changed files with 30 additions and 3 deletions

View File

@ -141,7 +141,17 @@ class FieldMatcherRule(Rule):
(MATCH_EXACT, _('Exact')),
)
user_field = models.TextField()
USER_FIELDS = (
('username', 'username',),
('first_name', 'first_name',),
('last_name', 'last_name',),
('email', 'email',),
('is_staff', 'is_staff',),
('is_active', 'is_active',),
('data_joined', 'data_joined',),
)
user_field = models.TextField(choices=USER_FIELDS)
match_action = models.CharField(max_length=50, choices=MATCHES)
value = models.TextField()