MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / updateSourceAuthStatus

Function updateSourceAuthStatus

deployments/desktop/static/desktop.js:4875–4888  ·  view source on GitHub ↗
(sourcePrefs, env)

Source from the content-addressed store, hash-verified

4873 }
4874
4875 function updateSourceAuthStatus(sourcePrefs, env) {
4876 const semanticKey = envInfo(env, "SEMANTIC_SCHOLAR_API_KEY");
4877 const openReviewUser = envInfo(env, "OPENREVIEW_USERNAME");
4878 const openReviewToken = envInfo(env, "OPENREVIEW_TOKEN");
4879 const openReviewCookie = envInfo(env, "OPENREVIEW_COOKIE_FILE");
4880 const conferenceCookie = envInfo(env, "PAPERFLOW_CONFERENCE_COOKIE_FILE");
4881 const hasOpenReviewAuth = openReviewUser.present || openReviewToken.present || openReviewCookie.present;
4882 const hasConferenceAuth = hasOpenReviewAuth || conferenceCookie.present;
4883 const mode = currentConferenceAccessMode() || sourcePrefs.conference_access_mode || "public";
4884
4885 setSourceStatus("semanticScholarAuthStatus", ui().settings.apiKeyConfigured, ui().settings.semanticOptional, semanticKey.present);
4886 setSourceStatus("openReviewAuthStatus", ui().settings.authConfigured, ui().settings.openReviewPublic, hasOpenReviewAuth);
4887 syncConferenceAccessUi(mode, hasConferenceAuth);
4888 }
4889
4890 function envRow(env, key, label, fallback = "", aliases = []) {
4891 const info = envInfo(env, key, fallback, aliases);

Callers 2

applyLocaleFunction · 0.85
renderSettingsFunction · 0.85

Calls 5

envInfoFunction · 0.85
setSourceStatusFunction · 0.85
uiFunction · 0.85
syncConferenceAccessUiFunction · 0.85

Tested by

no test coverage detected