    def admin_only(self):
        """Decorator for restricting access to admin users"""
        user = self.current_user
        if user is None or not user.admin:
            raise web.HTTPError(403)
Decorator for restricting access to admin users
jupyterhub/utils.py