-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Use RoutesBuilder API #29
Conversation
44166a8
to
164f94f
Compare
…tes-builder # Conflicts: # src/main/frontend/routes.tsx
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.
Suggesting import format to be same everywhere with a spaces around inside import { ... }
.
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.
Looks fine, but it works a bit strange.
It had all the routes for the different users, also the ones that are not applicable for the user.
So the Flow view is there for user, which leads to a Reason: Access is denied by annotations on the view.
.
And Hilla User is there for admin which leads to the login view, even though you are already logged in.
Yeah, I'll try to change that by editing the main layout impl. |
Co-authored-by: Tomi Virtanen <[email protected]>
Unfortunately, I couldn't manage to make it work with the
Thus, I'm not sure how can I filter the menu items by access (in role and is logged in). I pushed an ugly checking codes that works, but we have to replace it with a proper way. |
UPD: <nav>
{
createMenuItems().map(({ to, icon, title }) => (
<NavLink className={navLinkClasses} to={to} key={to}>
{title}
</NavLink>
))
},
{ flowIsInRole ? (
<NavLink to={'/flow'} className={navLinkClasses}>
Flow Admin
</NavLink>
) : null}
</nav> Later on, when we implement this feature in Flow, we will be able to even remove that part { flowIsInRole ? (
<NavLink to={'/flow'} className={navLinkClasses}>
Flow Admin
</NavLink>
) : null} as server-side routes will be checked agains access control and added into So we should wait for Vaadin 24.4.0.alpha22 release, remove my workaround for Hilla view, then wait for the above feature in Flow and just leave the following codes: <nav>
{
createMenuItems().map(({ to, icon, title }) => (
<NavLink className={navLinkClasses} to={to} key={to}>
{title}
</NavLink>
))
}
</nav> |
No description provided.