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
|
||||
if vendor_code not in dict.vendors.backward or vendor_name not in dict.vendors.forward:
|
||||
dict.vendors.Add(vendor_name, vendor_code)
|
||||
if attribute_name not in dict.attributes:
|
||||
dict.attributes[f"{vendor_name}-{attribute_name}"] = Attribute(
|
||||
full_attribute_name = f"{vendor_name}-{attribute_name}"
|
||||
if full_attribute_name not in dict.attributes:
|
||||
dict.attributes[full_attribute_name] = Attribute(
|
||||
attribute_name, attribute_code, attribute_type, vendor=vendor_name
|
||||
)
|
||||
|
||||
|
@ -21,6 +21,7 @@ import {
|
||||
PropertyMappingTestRequest,
|
||||
PropertyMappingTestResult,
|
||||
PropertymappingsApi,
|
||||
RbacPermissionsAssignedByUsersListModelEnum,
|
||||
User,
|
||||
} from "@goauthentik/api";
|
||||
|
||||
@ -67,7 +68,8 @@ export class PolicyTestForm extends Form<PropertyMappingTestRequest> {
|
||||
}
|
||||
|
||||
renderExampleButtons() {
|
||||
return this.mapping?.metaModelName === "authentik_sources_ldap.ldappropertymapping"
|
||||
return this.mapping?.metaModelName ===
|
||||
RbacPermissionsAssignedByUsersListModelEnum.SourcesLdapLdapsourcepropertymapping
|
||||
? html`<p>${msg("Example context data")}</p>
|
||||
${this.renderExampleLDAP()}`
|
||||
: nothing;
|
||||
|
Reference in New Issue
Block a user