providers/radius: fix custom attribute (#10704)
* providers/radius: fix error when adding custom attribute Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix ldap source property mapping form Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -117,8 +117,9 @@ class RadiusOutpostConfigViewSet(ListModelMixin, GenericViewSet):
|
|||||||
# Ensure the vendor exists
|
# Ensure the vendor exists
|
||||||
if vendor_code not in dict.vendors.backward or vendor_name not in dict.vendors.forward:
|
if vendor_code not in dict.vendors.backward or vendor_name not in dict.vendors.forward:
|
||||||
dict.vendors.Add(vendor_name, vendor_code)
|
dict.vendors.Add(vendor_name, vendor_code)
|
||||||
if attribute_name not in dict.attributes:
|
full_attribute_name = f"{vendor_name}-{attribute_name}"
|
||||||
dict.attributes[f"{vendor_name}-{attribute_name}"] = Attribute(
|
if full_attribute_name not in dict.attributes:
|
||||||
|
dict.attributes[full_attribute_name] = Attribute(
|
||||||
attribute_name, attribute_code, attribute_type, vendor=vendor_name
|
attribute_name, attribute_code, attribute_type, vendor=vendor_name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import {
|
|||||||
PropertyMappingTestRequest,
|
PropertyMappingTestRequest,
|
||||||
PropertyMappingTestResult,
|
PropertyMappingTestResult,
|
||||||
PropertymappingsApi,
|
PropertymappingsApi,
|
||||||
|
RbacPermissionsAssignedByUsersListModelEnum,
|
||||||
User,
|
User,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
@ -67,7 +68,8 @@ export class PolicyTestForm extends Form<PropertyMappingTestRequest> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderExampleButtons() {
|
renderExampleButtons() {
|
||||||
return this.mapping?.metaModelName === "authentik_sources_ldap.ldappropertymapping"
|
return this.mapping?.metaModelName ===
|
||||||
|
RbacPermissionsAssignedByUsersListModelEnum.SourcesLdapLdapsourcepropertymapping
|
||||||
? html`<p>${msg("Example context data")}</p>
|
? html`<p>${msg("Example context data")}</p>
|
||||||
${this.renderExampleLDAP()}`
|
${this.renderExampleLDAP()}`
|
||||||
: nothing;
|
: nothing;
|
||||||
|
Reference in New Issue
Block a user