-
Notifications
You must be signed in to change notification settings - Fork 41
Issue/392 require tanam user role to access the cms #410
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
Merged
DennisAlund
merged 19 commits into
milestone/4-user-management
from
issue/392-require-tanam-user-role-to-access-the-cms
Jul 30, 2024
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
fb88307
setup local emulator but still error
muzanella11 f163565
Merge branch 'milestone/4-user-management' into issue/392-require-tan…
muzanella11 25480f7
remove unsed
muzanella11 3bfceaf
create error page
muzanella11 07144de
create error page
muzanella11 4a3d548
remove unused
muzanella11 76aad2e
redirect to error page when user doesnt have docid
muzanella11 ce299e2
move the redirect process in header
muzanella11 ef7984e
remove unused
muzanella11 7109423
update error page
muzanella11 a8ca876
fix lint
muzanella11 f1c0984
remove yarn lock in gitignore
muzanella11 a592b53
add validation check custom claims
muzanella11 a8d3a32
fix inconsistency
muzanella11 827f797
specific error page for insufficient role
muzanella11 7064ec8
add functionality for get user role
muzanella11 7980dcb
fix lint
muzanella11 ae3bdac
remove unused
muzanella11 b1bcdec
Merge branch 'milestone/4-user-management' into issue/392-require-tan…
muzanella11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Compiled JavaScript files | ||
lib | ||
lib/**/*.js | ||
lib/**/*.js.map | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
hosting/src/app/(protected)/error/insufficient-role/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"use client"; | ||
import Loader from "@/components/common/Loader"; | ||
import Notification from "@/components/common/Notification"; | ||
import PageHeader from "@/components/common/PageHeader"; | ||
import {useAuthentication} from "@/hooks/useAuthentication"; | ||
import {useTanamUser} from "@/hooks/useTanamUser"; | ||
import {Suspense} from "react"; | ||
|
||
export default function ErrorInsufficientRolePage() { | ||
const {authUser} = useAuthentication(); | ||
const {error: userError} = useTanamUser(authUser?.uid); | ||
|
||
return ( | ||
<> | ||
<Suspense fallback={<Loader />}> | ||
<PageHeader pageName="Insufficient role" /> | ||
<Notification | ||
type="error" | ||
title={userError?.title || "Something wrong"} | ||
message={userError?.message || "Unknown error"} | ||
/> | ||
</Suspense> | ||
</> | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"use client"; | ||
import Loader from "@/components/common/Loader"; | ||
import Notification from "@/components/common/Notification"; | ||
import PageHeader from "@/components/common/PageHeader"; | ||
import {Suspense} from "react"; | ||
|
||
export default function ErrorPage() { | ||
return ( | ||
<> | ||
<Suspense fallback={<Loader />}> | ||
<PageHeader pageName="Error" /> | ||
<Notification type="error" title="Something wrong" message="Unknown error" /> | ||
</Suspense> | ||
</> | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding email sign in is not part of the scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a change in indentation when doing
yarn codecheck
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You added it
fb88307#diff-f36bd848e1db75f098c291aa1e4c34458f2103c6ac5ea1cf2f8bd74ed7decc5f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it seems there was a mistake from me because I forgot to delete the testing code. I thought it was just because of the indentation problem and I forgot to add it. I also forgot if we don't have a login with email button.
I'll delete it in the next update