From f35457492b7bf4eba7051289606d18d2a001739d Mon Sep 17 00:00:00 2001 From: RogueThorn Date: Thu, 16 Jan 2025 15:41:22 +0100 Subject: [PATCH] website/integrations: snipe-it: remove ldap property mapping (#12688) * Remove property mapping from snipe-it https://github.com/goauthentik/authentik/issues/7058 Property mapping for ldap outpost is not supported at the moment. I removed it, because it creates too much confusion. Signed-off-by: RogueThorn * format Signed-off-by: Jens Langhammer --------- Signed-off-by: RogueThorn Signed-off-by: Jens Langhammer Co-authored-by: Jens Langhammer --- .../integrations/services/snipe-it/index.md | 35 +------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/website/integrations/services/snipe-it/index.md b/website/integrations/services/snipe-it/index.md index 0e9b71cfe9..738b9e3091 100644 --- a/website/integrations/services/snipe-it/index.md +++ b/website/integrations/services/snipe-it/index.md @@ -113,42 +113,9 @@ You must sync your LDAP database with Snipe-IT. Go to People on the sidebar menu - Select your Location - Click Synchronize :::note - Snipe-IT will only import users with both a first and last name set. If you do not have first and last names stored in your users attributes, you can create a property mapping to set first and last name. + Snipe-IT will only import users with both a first and last name set. You need to create user attributes with first and last names. ::: -## authentik Property Mapping - -To create a policy mapping, go to _Customization/Property Mappings_, click `Create` then `LDAP Property Mapping`. Name is 'sn' and set Object field to sn: - -```ini -def getLastName(): - if len(request.user.name) >= 1: - return request.user.name.split(" ")[1] - elif len(request.user.name) == 1: - return request.user.name.split(" ")[1] - else: - return "" - -return { - "sn": getLastName(), -} - -``` - -Create a second policy mapping, name it 'givenname' and set Object field to 'givenname' - -``` -def getFirstName(): - if len(request.user.name) >= 1: - return request.user.name.split(" ")[0] - else: - return f"N/A" - -return { - "givenname": getFirstName(), -} -``` - ## authentik SAML Config ### Step 1