diff --git a/authentik/providers/ldap/api.py b/authentik/providers/ldap/api.py index 05e1036d0..b4c7a861f 100644 --- a/authentik/providers/ldap/api.py +++ b/authentik/providers/ldap/api.py @@ -11,7 +11,7 @@ from authentik.providers.ldap.models import LDAPProvider class LDAPProviderSerializer(ProviderSerializer): """LDAPProvider Serializer""" - outpost_set = ListField(child=CharField(), read_only=True) + outpost_set = ListField(child=CharField(), read_only=True, source="outpost_set.all") class Meta: diff --git a/authentik/providers/proxy/api.py b/authentik/providers/proxy/api.py index f9ac69e75..853551872 100644 --- a/authentik/providers/proxy/api.py +++ b/authentik/providers/proxy/api.py @@ -36,7 +36,7 @@ class ProxyProviderSerializer(ProviderSerializer): """ProxyProvider Serializer""" redirect_uris = CharField(read_only=True) - outpost_set = ListField(child=CharField(), read_only=True) + outpost_set = ListField(child=CharField(), read_only=True, source="outpost_set.all") def validate(self, attrs) -> dict[Any, str]: """Check that internal_host is set when mode is Proxy""" diff --git a/web/src/elements/Tabs.ts b/web/src/elements/Tabs.ts index 16db10ccd..744932d09 100644 --- a/web/src/elements/Tabs.ts +++ b/web/src/elements/Tabs.ts @@ -100,6 +100,7 @@ export class Tabs extends LitElement { ${pages.map((page) => this.renderTab(page))} + `; } } diff --git a/web/src/locales/en.po b/web/src/locales/en.po index 3ca13bff9..4102cac68 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -5475,10 +5475,25 @@ msgstr "Wait (min)" msgid "Warning" msgstr "Warning" +#: src/pages/stages/invitation/InvitationListPage.ts +msgid "Warning: No invitation stage is bound to any flow. Invitations will not work as expected." +msgstr "Warning: No invitation stage is bound to any flow. Invitations will not work as expected." + #: src/pages/policies/PolicyListPage.ts msgid "Warning: Policy is not assigned." msgstr "Warning: Policy is not assigned." +#: src/pages/providers/ldap/LDAPProviderViewPage.ts +#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts +#: src/pages/providers/proxy/ProxyProviderViewPage.ts +msgid "Warning: Provider is not used by an Application." +msgstr "Warning: Provider is not used by an Application." + +#: src/pages/providers/ldap/LDAPProviderViewPage.ts +#: src/pages/providers/proxy/ProxyProviderViewPage.ts +msgid "Warning: Provider is not used by any Outpost." +msgstr "Warning: Provider is not used by any Outpost." + #: src/pages/providers/ProviderListPage.ts msgid "Warning: Provider not assigned to any application." msgstr "Warning: Provider not assigned to any application." diff --git a/web/src/locales/fr_FR.po b/web/src/locales/fr_FR.po index 76577abc2..4a28a3349 100644 --- a/web/src/locales/fr_FR.po +++ b/web/src/locales/fr_FR.po @@ -5414,10 +5414,25 @@ msgstr "Attente (min)" msgid "Warning" msgstr "Avertissement" +#: src/pages/stages/invitation/InvitationListPage.ts +msgid "Warning: No invitation stage is bound to any flow. Invitations will not work as expected." +msgstr "" + #: src/pages/policies/PolicyListPage.ts msgid "Warning: Policy is not assigned." msgstr "Avertissement : la politique n'est pas assignée." +#: src/pages/providers/ldap/LDAPProviderViewPage.ts +#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts +#: src/pages/providers/proxy/ProxyProviderViewPage.ts +msgid "Warning: Provider is not used by an Application." +msgstr "" + +#: src/pages/providers/ldap/LDAPProviderViewPage.ts +#: src/pages/providers/proxy/ProxyProviderViewPage.ts +msgid "Warning: Provider is not used by any Outpost." +msgstr "" + #: src/pages/providers/ProviderListPage.ts msgid "Warning: Provider not assigned to any application." msgstr "Avertissement : le fournisseur n'est assigné à aucune application." diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index 588acbb3a..1f2c7c93e 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -5460,10 +5460,25 @@ msgstr "" msgid "Warning" msgstr "" +#: src/pages/stages/invitation/InvitationListPage.ts +msgid "Warning: No invitation stage is bound to any flow. Invitations will not work as expected." +msgstr "" + #: src/pages/policies/PolicyListPage.ts msgid "Warning: Policy is not assigned." msgstr "" +#: src/pages/providers/ldap/LDAPProviderViewPage.ts +#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts +#: src/pages/providers/proxy/ProxyProviderViewPage.ts +msgid "Warning: Provider is not used by an Application." +msgstr "" + +#: src/pages/providers/ldap/LDAPProviderViewPage.ts +#: src/pages/providers/proxy/ProxyProviderViewPage.ts +msgid "Warning: Provider is not used by any Outpost." +msgstr "" + #: src/pages/providers/ProviderListPage.ts msgid "Warning: Provider not assigned to any application." msgstr "" diff --git a/web/src/pages/providers/ldap/LDAPProviderViewPage.ts b/web/src/pages/providers/ldap/LDAPProviderViewPage.ts index 7c696a922..265185d27 100644 --- a/web/src/pages/providers/ldap/LDAPProviderViewPage.ts +++ b/web/src/pages/providers/ldap/LDAPProviderViewPage.ts @@ -4,6 +4,7 @@ import { CSSResult, LitElement, TemplateResult, html } from "lit"; import { customElement, property } from "lit/decorators.js"; import AKGlobal from "../../../authentik.css"; +import PFBanner from "@patternfly/patternfly/components/Banner/banner.css"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; import PFCard from "@patternfly/patternfly/components/Card/card.css"; import PFContent from "@patternfly/patternfly/components/Content/content.css"; @@ -58,6 +59,7 @@ export class LDAPProviderViewPage extends LitElement { PFCard, PFDescriptionList, PFSizing, + PFBanner, AKGlobal, ]; } @@ -75,6 +77,16 @@ export class LDAPProviderViewPage extends LitElement { return html``; } return html` + ${this.provider?.assignedApplicationName + ? html`` + : html`
+ ${t`Warning: Provider is not used by an Application.`} +
`} + ${this.provider?.outpostSet.length < 1 + ? html`
+ ${t`Warning: Provider is not used by any Outpost.`} +
` + : html``}
+ ${this.provider?.assignedApplicationName + ? html`` + : html`
+ ${t`Warning: Provider is not used by an Application.`} +
`}
+ return html` + ${this.provider?.assignedApplicationName + ? html`` + : html`
+ ${t`Warning: Provider is not used by an Application.`} +
`} + ${this.provider?.outpostSet.length < 1 + ? html`
+ ${t`Warning: Provider is not used by any Outpost.`} +
` + : html``}