From 0403f6d3733313eea70513f43235ee15e5e6927a Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 26 Jun 2021 22:03:19 +0200 Subject: [PATCH] web/admin: add flow export button on flow view page Signed-off-by: Jens Langhammer --- authentik/flows/markers.py | 5 +++++ web/src/locales/en.po | 9 +++++++-- web/src/locales/pseudo-LOCALE.po | 7 ++++++- web/src/pages/flows/FlowViewPage.ts | 18 ++++++++++++++---- web/src/pages/flows/StageBindingForm.ts | 2 +- website/docs/releases/v2021.6.md | 14 ++++++++++++++ 6 files changed, 47 insertions(+), 8 deletions(-) diff --git a/authentik/flows/markers.py b/authentik/flows/markers.py index 1d710cd4f..e0b773982 100644 --- a/authentik/flows/markers.py +++ b/authentik/flows/markers.py @@ -40,6 +40,11 @@ class ReevaluateMarker(StageMarker): self, plan: "FlowPlan", stage: Stage, http_request: Optional[HttpRequest] ) -> Optional[Stage]: """Re-evaluate policies bound to stage, and if they fail, remove from plan""" + LOGGER.debug( + "f(plan_inst)[re-eval marker]: running re-evaluation", + stage=stage, + binding=self.binding, + ) engine = PolicyEngine(self.binding, self.user) engine.use_cache = False if http_request: diff --git a/web/src/locales/en.po b/web/src/locales/en.po index 6cf58af8c..908a4565e 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -1372,8 +1372,8 @@ msgid "Evaluate policies before the Stage is present to the user." msgstr "Evaluate policies before the Stage is present to the user." #: src/pages/flows/StageBindingForm.ts -msgid "Evaluate policies during the Flow planning process. Disable this for input-based policies. Should be used in conjunction with 'Re-evaluate policies', as with this option disabled, policies are **not** evaluated." -msgstr "Evaluate policies during the Flow planning process. Disable this for input-based policies. Should be used in conjunction with 'Re-evaluate policies', as with this option disabled, policies are **not** evaluated." +msgid "Evaluate policies during the Flow planning process. Disable this for input-based policies. Should be used in conjunction with 'Re-evaluate policies', as with both options disabled, policies are **not** evaluated." +msgstr "Evaluate policies during the Flow planning process. Disable this for input-based policies. Should be used in conjunction with 'Re-evaluate policies', as with both options disabled, policies are **not** evaluated." #: src/pages/events/EventListPage.ts msgid "Event Log" @@ -1451,9 +1451,14 @@ msgid "Explicit Consent" msgstr "Explicit Consent" #: src/pages/flows/FlowListPage.ts +#: src/pages/flows/FlowViewPage.ts msgid "Export" msgstr "Export" +#: src/pages/flows/FlowViewPage.ts +msgid "Export flow" +msgstr "Export flow" + #: src/pages/events/EventInfo.ts #: src/pages/policies/expression/ExpressionPolicyForm.ts #: src/pages/property-mappings/PropertyMappingLDAPForm.ts diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index e814e6791..b708ce2f4 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -1364,7 +1364,7 @@ msgid "Evaluate policies before the Stage is present to the user." msgstr "" #: -msgid "Evaluate policies during the Flow planning process. Disable this for input-based policies. Should be used in conjunction with 'Re-evaluate policies', as with this option disabled, policies are **not** evaluated." +msgid "Evaluate policies during the Flow planning process. Disable this for input-based policies. Should be used in conjunction with 'Re-evaluate policies', as with both options disabled, policies are **not** evaluated." msgstr "" #: @@ -1442,10 +1442,15 @@ msgstr "" msgid "Explicit Consent" msgstr "" +#: #: msgid "Export" msgstr "" +#: +msgid "Export flow" +msgstr "" + #: #: #: diff --git a/web/src/pages/flows/FlowViewPage.ts b/web/src/pages/flows/FlowViewPage.ts index 4710f17b6..eaf19127c 100644 --- a/web/src/pages/flows/FlowViewPage.ts +++ b/web/src/pages/flows/FlowViewPage.ts @@ -51,9 +51,9 @@ export class FlowViewPage extends LitElement { return html``; } return html` + icon="pf-icon pf-icon-process-automation" + header=${this.flow.name} + description=${this.flow.title}>
@@ -69,7 +69,7 @@ export class FlowViewPage extends LitElement {
+
+ ${t`Export flow`} +
+
+ +
diff --git a/web/src/pages/flows/StageBindingForm.ts b/web/src/pages/flows/StageBindingForm.ts index ecce2cd6d..b669752c9 100644 --- a/web/src/pages/flows/StageBindingForm.ts +++ b/web/src/pages/flows/StageBindingForm.ts @@ -123,7 +123,7 @@ export class StageBindingForm extends ModelForm {

- ${t`Evaluate policies during the Flow planning process. Disable this for input-based policies. Should be used in conjunction with 'Re-evaluate policies', as with this option disabled, policies are **not** evaluated.`} + ${t`Evaluate policies during the Flow planning process. Disable this for input-based policies. Should be used in conjunction with 'Re-evaluate policies', as with both options disabled, policies are **not** evaluated.`}

diff --git a/website/docs/releases/v2021.6.md b/website/docs/releases/v2021.6.md index 22af5446d..d20a46f49 100644 --- a/website/docs/releases/v2021.6.md +++ b/website/docs/releases/v2021.6.md @@ -116,6 +116,20 @@ slug: "2021.6" - web/admin: handle elements in slot=form not being forms - web/admin: sort inputs on authenticator validation stage form +## Fixed in 2021.6.3 + +- core: fix flow background not correctly loading on initial draw +- events: only create SYSTEM_EXCEPTION event when error would've been sent to sentry +- expressions: fix regex_match result being inverted +- outposts: check docker container ports match +- outposts/ldap: fixed IsActive and IsSuperuser returning swapped incorrect values (#1078) +- providers/oauth2: fix exp of JWT when not using seconds +- sources/ldap: improve error handling when checking for password complexity on non-ad setups +- stages/authenticator_duo: fix component not being set in API +- web/admin: fix deletion of authenticator not reloading the state correctly +- web/admin: fix only recovery flows being selectable for unenrollment flow in tenant form +- web/admin: fix text color on pf-c-card + ## Upgrading This release does not introduce any new requirements.