docs: 🚑 when not authorized, user will be redirect to request early access
Signed-off-by: jffarge <jf@dagger.io>
This commit is contained in:
parent
7cbb160f4e
commit
14062c3c38
@ -151,8 +151,8 @@ function DocPage(props) {
|
|||||||
useEffect(async () => {
|
useEffect(async () => {
|
||||||
if (!isEmpty(authQuery) && userAccessStatus === null) { //callback after successful auth with github
|
if (!isEmpty(authQuery) && userAccessStatus === null) { //callback after successful auth with github
|
||||||
const user = await checkUserCollaboratorStatus(authQuery.code);
|
const user = await checkUserCollaboratorStatus(authQuery.code);
|
||||||
if (user?.permission) {
|
|
||||||
setUserAccessStatus(user)
|
setUserAccessStatus(user)
|
||||||
|
if (user?.permission) {
|
||||||
if (typeof window !== "undefined") window.localStorage.setItem('user', JSON.stringify(user));
|
if (typeof window !== "undefined") window.localStorage.setItem('user', JSON.stringify(user));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user