fix: Made sure that object edit buttons are only visible to those that can edit them
fix: Made sure that object edit buttons are only visible to those that can edit them

- also, some cleanup in the code to make it more readable

MISP/MISP,devnull-/MISP,FIRSTdotorg/MISP,FloatingGhost/MISP,MISP/MISP,devnull-/MISP,devnull-/MISP,devnull-/MISP,FIRSTdotorg/MISP,FIRSTdotorg/MISP,Rafiot/MISP,SteveClement/MISP,MISP/MISP,SteveClement/MISP,FloatingGhost/MISP,SteveClement/MISP,FloatingGhost/MISP,FIRSTdotorg/MISP,MISP/MISP,Rafiot/MISP,FloatingGhost/MISP,Rafiot/MISP,Rafiot/MISP,MISP/MISP,SteveClement/MISP,SteveClement/MISP