Added function decorator to restrict access based on permission