How do you lock a ladder.”?
Hinged metal plate attached to one side of the ladder to prevent access to the ladder rungs.
Seen most often on roof access hatch ladders at warehouses.
But that only applies to attached ladders.
I don’t know what type of ladder was present on this site.
If you look at most McDonald’s buildings they’ll have a ladder with a locked metal plate over it leading to the roof.
https://www.fallprotectionusa.com/product/ladder-guard-ladder-door-security-system-bluewater/
Here’s one kind.
I don’t know what kind of ladder they have but assuming it is a vertical roof ladder then they usually have some sort of locking device to prevent having a permanent ladder for anyone to use to get on their roof anytime they like.
Here are some examples but the styles vary.
https://www.google.com/search?q=lockable+ladder+guard&udm=2&hl=en-US&sa=X&ved=2ahUKEwj9m5LFwKmHAxV9xskDHaozDdoQtI8BKAB6BAgAEDg