diff --git a/authentik/policies/event_matcher/forms.py b/authentik/policies/event_matcher/forms.py index 8f4fc55f4..822a0c6e0 100644 --- a/authentik/policies/event_matcher/forms.py +++ b/authentik/policies/event_matcher/forms.py @@ -1,6 +1,7 @@ """authentik Event Matcher Policy forms""" from django import forms +from django.utils.translation import gettext_lazy as _ from authentik.policies.event_matcher.models import EventMatcherPolicy from authentik.policies.forms import GENERAL_FIELDS @@ -21,3 +22,4 @@ class EventMatcherPolicyForm(forms.ModelForm): "name": forms.TextInput(), "client_ip": forms.TextInput(), } + labels = {"client_ip": _("Client IP")} diff --git a/authentik/policies/event_matcher/migrations/0004_auto_20210112_2158.py b/authentik/policies/event_matcher/migrations/0004_auto_20210112_2158.py new file mode 100644 index 000000000..d4a6112f2 --- /dev/null +++ b/authentik/policies/event_matcher/migrations/0004_auto_20210112_2158.py @@ -0,0 +1,79 @@ +# Generated by Django 3.1.4 on 2021-01-12 21:58 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("authentik_policies_event_matcher", "0003_auto_20210110_1907"), + ] + + operations = [ + migrations.AlterModelOptions( + name="eventmatcherpolicy", + options={ + "verbose_name": "Event Matcher Policy", + "verbose_name_plural": "Event Matcher Policies", + }, + ), + migrations.AlterField( + model_name="eventmatcherpolicy", + name="app", + field=models.TextField( + blank=True, + choices=[ + ("authentik.admin", "authentik Admin"), + ("authentik.api", "authentik API"), + ("authentik.events", "authentik Events"), + ("authentik.crypto", "authentik Crypto"), + ("authentik.flows", "authentik Flows"), + ("authentik.outposts", "authentik Outpost"), + ("authentik.lib", "authentik lib"), + ("authentik.policies", "authentik Policies"), + ("authentik.policies.dummy", "authentik Policies.Dummy"), + ( + "authentik.policies.event_matcher", + "authentik Policies.Event Matcher", + ), + ("authentik.policies.expiry", "authentik Policies.Expiry"), + ("authentik.policies.expression", "authentik Policies.Expression"), + ( + "authentik.policies.group_membership", + "authentik Policies.Group Membership", + ), + ("authentik.policies.hibp", "authentik Policies.HaveIBeenPwned"), + ("authentik.policies.password", "authentik Policies.Password"), + ("authentik.policies.reputation", "authentik Policies.Reputation"), + ("authentik.providers.proxy", "authentik Providers.Proxy"), + ("authentik.providers.oauth2", "authentik Providers.OAuth2"), + ("authentik.providers.saml", "authentik Providers.SAML"), + ("authentik.recovery", "authentik Recovery"), + ("authentik.sources.ldap", "authentik Sources.LDAP"), + ("authentik.sources.oauth", "authentik Sources.OAuth"), + ("authentik.sources.saml", "authentik Sources.SAML"), + ("authentik.stages.captcha", "authentik Stages.Captcha"), + ("authentik.stages.consent", "authentik Stages.Consent"), + ("authentik.stages.dummy", "authentik Stages.Dummy"), + ("authentik.stages.email", "authentik Stages.Email"), + ("authentik.stages.prompt", "authentik Stages.Prompt"), + ( + "authentik.stages.identification", + "authentik Stages.Identification", + ), + ("authentik.stages.invitation", "authentik Stages.User Invitation"), + ("authentik.stages.user_delete", "authentik Stages.User Delete"), + ("authentik.stages.user_login", "authentik Stages.User Login"), + ("authentik.stages.user_logout", "authentik Stages.User Logout"), + ("authentik.stages.user_write", "authentik Stages.User Write"), + ("authentik.stages.otp_static", "authentik Stages.OTP.Static"), + ("authentik.stages.otp_time", "authentik Stages.OTP.Time"), + ("authentik.stages.otp_validate", "authentik Stages.OTP.Validate"), + ("authentik.stages.password", "authentik Stages.Password"), + ("authentik.core", "authentik Core"), + ], + default="", + help_text="Match events created by selected application. When left empty, all applications are matched.", + ), + ), + ] diff --git a/authentik/policies/event_matcher/models.py b/authentik/policies/event_matcher/models.py index f896a9460..ee0a3a4d0 100644 --- a/authentik/policies/event_matcher/models.py +++ b/authentik/policies/event_matcher/models.py @@ -87,5 +87,5 @@ class EventMatcherPolicy(Policy): class Meta: - verbose_name = _("Group Membership Policy") - verbose_name_plural = _("Group Membership Policies") + verbose_name = _("Event Matcher Policy") + verbose_name_plural = _("Event Matcher Policies") diff --git a/authentik/sources/oauth/views/callback.py b/authentik/sources/oauth/views/callback.py index bd0d249e4..cac0b05ec 100644 --- a/authentik/sources/oauth/views/callback.py +++ b/authentik/sources/oauth/views/callback.py @@ -15,7 +15,8 @@ from authentik.events.models import Event, EventAction from authentik.flows.models import Flow, in_memory_stage from authentik.flows.planner import ( PLAN_CONTEXT_PENDING_USER, - PLAN_CONTEXT_REDIRECT, PLAN_CONTEXT_SOURCE, + PLAN_CONTEXT_REDIRECT, + PLAN_CONTEXT_SOURCE, PLAN_CONTEXT_SSO, FlowPlanner, ) diff --git a/authentik/sources/saml/processors/response.py b/authentik/sources/saml/processors/response.py index bfa3337f0..f99e188c6 100644 --- a/authentik/sources/saml/processors/response.py +++ b/authentik/sources/saml/processors/response.py @@ -13,7 +13,8 @@ from authentik.core.models import User from authentik.flows.models import Flow from authentik.flows.planner import ( PLAN_CONTEXT_PENDING_USER, - PLAN_CONTEXT_REDIRECT, PLAN_CONTEXT_SOURCE, + PLAN_CONTEXT_REDIRECT, + PLAN_CONTEXT_SOURCE, PLAN_CONTEXT_SSO, FlowPlanner, ) diff --git a/swagger.yaml b/swagger.yaml index 25ef05c2d..7792ccdaf 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -2817,7 +2817,7 @@ paths: parameters: - name: policy_uuid in: path - description: A UUID string identifying this Group Membership Policy. + description: A UUID string identifying this Event Matcher Policy. required: true type: string format: uuid