MCPcopy Index your code
hub / github.com/OpenSIST/OpenSIST.github.io / isAuthApplicant

Function isAuthApplicant

src/Data/ApplicantData.js:163–175  ·  view source on GitHub ↗
(applicantId)

Source from the content-addressed store, hash-verified

161
162
163export async function isAuthApplicant(applicantId) {
164 /*
165 * Check if the user is authorized to access the applicant
166 * @param applicantId [String]: applicantId
167 * @return: [Boolean]: whether the user is authorized to access the applicant
168 */
169 if (!applicantId) {
170 return false;
171 }
172 const displayName = await getDisplayName();
173 const applicantUsername = applicantId.split('@')[0];
174 return applicantUsername === displayName;
175}

Callers 3

BasicInfoBlockFunction · 0.90
loaderFunction · 0.90
setApplicantFunction · 0.85

Calls 1

getDisplayNameFunction · 0.90

Tested by

no test coverage detected