check the deployment exists, then check for permissions