Skip to content

Commit

Permalink
Remove property mapping from snipe-it
Browse files Browse the repository at this point in the history
#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 <DunklerPhoenix@users.noreply.github.com>
  • Loading branch information
DunklerPhoenix authored Jan 16, 2025
1 parent 8132733 commit faf1d66
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions website/integrations/services/snipe-it/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,41 +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

Expand Down

0 comments on commit faf1d66

Please sign in to comment.