created isAuthorized method on file controllers