docs: function assertSetupCompleted(status) {
      return function checkPermission(__) {
          return checkSetup().then((isSetup) => {
              if (isSetup === status) {
                  return __;
              }
  
              const completed = common.i18n.t('errors.api.authentication.setupAlreadyCompleted'),
                  notCompleted = common.i18n.t('errors.api.authentication.setupMustBeCompleted');
  
              function throwReason(reason) {
                  throw new common.errors.NoPermissionError({message: reason});
              }
  
              if (isSetup) {
                  throwReason(completed);
              } else {
                  throwReason(notCompleted);
              }
          });
      };
  }