mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
fix: country/region prompted page not show when signin (#1047)
This commit is contained in:
parent
7312c5ce3c
commit
39c6bd5850
@ -320,6 +320,19 @@ function isProviderItemAnswered(user, application, providerItem) {
|
|||||||
return linkedValue !== undefined && linkedValue !== "";
|
return linkedValue !== undefined && linkedValue !== "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isSignupItemAnswered(user, signupItem) {
|
||||||
|
if (user === null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (signupItem.name !== "Country/Region") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const value = user["region"];
|
||||||
|
return value !== undefined && value !== "";
|
||||||
|
}
|
||||||
|
|
||||||
export function isPromptAnswered(user, application) {
|
export function isPromptAnswered(user, application) {
|
||||||
if (!isAffiliationAnswered(user, application)) {
|
if (!isAffiliationAnswered(user, application)) {
|
||||||
return false;
|
return false;
|
||||||
@ -331,6 +344,13 @@ export function isPromptAnswered(user, application) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const signupItems = getAllPromptedSignupItems(application);
|
||||||
|
for (let i = 0; i < signupItems.length; i++) {
|
||||||
|
if (!isSignupItemAnswered(user, signupItems[i])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user