snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

LDAP sync sets asset location ID as 0 if there's no match

Open snipe opened this issue 7 months ago • 0 comments

If the location mapping is turned on in the LDAP sync and the user's LDAP location does not match an existing location, it's possible to end up with 0 as the location_id for assets.

I haven't yet dug through the code to see why that would trickle down to the assets table, but it results in assets with a location_id of 0, which means the asset cannot be checked in or out (since it will fail validation at the model level.) Since we don't currently allow location editing directly on the asset, we also have no way of exposing this error to the user.

snipe avatar Jun 05 '25 09:06 snipe