-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from certego/develop
1.4.0
- Loading branch information
Showing
18 changed files
with
792 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
...mpossible_travel/migrations/0012_remove_alert_valid_alert_filter_type_choices_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# Generated by Django 4.2.16 on 2025-01-27 07:43 | ||
|
||
import django.contrib.postgres.fields | ||
from django.db import migrations, models | ||
import impossible_travel.models | ||
import impossible_travel.validators | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("impossible_travel", "0011_alert_filter_type_alert_is_filtered_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveConstraint( | ||
model_name="alert", | ||
name="valid_alert_filter_type_choices", | ||
), | ||
migrations.RemoveConstraint( | ||
model_name="config", | ||
name="valid_alert_filters_choices", | ||
), | ||
migrations.AlterField( | ||
model_name="config", | ||
name="enabled_users", | ||
field=django.contrib.postgres.fields.ArrayField( | ||
base_field=models.CharField(max_length=50), | ||
blank=True, | ||
default=impossible_travel.models.get_default_enabled_users, | ||
help_text="List of selected users (strings or regex patterns) on which the detection will perform - If this field is not empty, the ignored_users field is ignored", | ||
null=True, | ||
size=None, | ||
validators=[impossible_travel.validators.validate_string_or_regex], | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="config", | ||
name="ignored_ips", | ||
field=django.contrib.postgres.fields.ArrayField( | ||
base_field=models.CharField(max_length=50), | ||
blank=True, | ||
default=impossible_travel.models.get_default_ignored_ips, | ||
help_text="List of IPs to remove from the detection", | ||
null=True, | ||
size=None, | ||
validators=[impossible_travel.validators.validate_ips_or_network], | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="config", | ||
name="ignored_users", | ||
field=django.contrib.postgres.fields.ArrayField( | ||
base_field=models.CharField(max_length=50), | ||
blank=True, | ||
default=impossible_travel.models.get_default_ignored_users, | ||
help_text="List of users (strings or regex patterns) to be ignored from the detection", | ||
null=True, | ||
size=None, | ||
validators=[impossible_travel.validators.validate_string_or_regex], | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="alert", | ||
constraint=models.CheckConstraint( | ||
check=models.Q( | ||
( | ||
"filter_type__contained_by", | ||
[ | ||
"ignored_users filter", | ||
"ignored_ips filter", | ||
"allowed_countries filter", | ||
"is_vip_filter", | ||
"alert_minimum_risk_score filter", | ||
"filtered_alerts_types filter", | ||
"ignore_mobile_logins filter", | ||
"ignored_ISPs filter", | ||
], | ||
), | ||
("filter_type", []), | ||
_connector="OR", | ||
), | ||
name="valid_alert_filter_type_choices", | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="config", | ||
constraint=models.CheckConstraint( | ||
check=models.Q( | ||
( | ||
"filtered_alerts_types__contained_by", | ||
[ | ||
"New Device", | ||
"Imp Travel", | ||
"New Country", | ||
"User Risk Threshold", | ||
"Login Anonymizer Ip", | ||
"Atypical Country", | ||
], | ||
), | ||
("filtered_alerts_types__isnull", True), | ||
_connector="OR", | ||
), | ||
name="valid_alert_filters_choices", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.