Combat log events don't use the general 'UnitID' like "target" and "focus" things like that. Instead it uses 'UnitGUID' which is a specific string of numbers that is unique to that unit.
What you would ultimately have to do is determine the UnitGUID of all the parameters in your table there, and attempt to match them with the combat log UnitGUID.
Something like this:
Code:
local function isallowedunit(guid)
for key, val in pairs(ncSpellalertDB.CONFIG.units) do
local currentID = UnitGUID(val)
if guid == currentID then
return true
end
end
return false
end