-
Notifications
You must be signed in to change notification settings - Fork 0
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
158 admin menu #219
158 admin menu #219
Conversation
Finaaalllyy, list users again in a new branch
Admin flag to determine if the user has admin privileges.
check if user and admin on each end point
handle general response Delete User
Finaaalllyy, list users again in a new branch
Admin flag to determine if the user has admin privileges.
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.
Useful change which takes a lot less code than I thought.
I'll push a fix for the uuid thing.
const [state, setState] = useState<UseUserReturn>({ | ||
isLoading: true, | ||
isLoggedIn: undefined, | ||
username: undefined, | ||
isAdmin: false, | ||
}) | ||
|
||
useOnce(async () => { | ||
try { | ||
const response = await fetch(import.meta.env.VITE_ZTOR_URL + "/user-info", { |
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.
When I log in with a Keycloak user who is not in the database, /user-info gives a 500 error with java.util.NoSuchElementException
.
Probably it should just have isAdmin: false
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.
Please fix this in UserRepository.isAdmin()
instead of in the frontend.
Display user option available only for admin user