Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle interactive response to multiple impersonation results #194

Open
github-actions bot opened this issue Jan 8, 2025 · 0 comments
Open

Handle interactive response to multiple impersonation results #194

github-actions bot opened this issue Jan 8, 2025 · 0 comments
Assignees
Labels
bug Something isn't working datadirect-puppeteer packages/datadirect-puppeteer

Comments

@github-actions
Copy link

github-actions bot commented Jan 8, 2025

// FIXME Handle interactive response to multiple impersonation results

          .length;
      })) === 1
    ) {
      this.page.on('response', async (response) => {
        if (response.url().match(/\/api\/webapp\/context/)) {
          const context: types.webapp.context.Response = await response.json();
          if (!context.IsImpersonating || !context.MasterUserInfo) {
            this.isSelf = true;
          }
          this.userInfo = context.UserInfo;
          contextReady();
        }
      });
      await this.page.click('#searchResults .SearchResultRow');
    } else {
      // FIXME Handle interactive response to multiple impersonation results
    }
    await impersonationContext.acquire();
    if (!this.isSelf) {
      await this.page.waitForSelector('#impersonate-banner');
    }
    if (impersonated) {
      impersonated();
    }
  }
@github-actions github-actions bot added the bug Something isn't working label Jan 8, 2025
@battis battis added the datadirect-puppeteer packages/datadirect-puppeteer label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working datadirect-puppeteer packages/datadirect-puppeteer
Projects
None yet
Development

No branches or pull requests

1 participant