You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has no effect unfortunately: if I log in under another user with another role, the view is accessible, and if I change to loginRequired: false, Hilla redirects me to /login.
If I remove ViewConfig from Hilla views, the behaviour is the same: the application just requires me to login.
Expected-behavior
Hilla should take role into account and not require me to log in if I set loginRequired: false.
export const config is a feature of the FS router. If you don't use it but instead configure routes manually, then you should put access control in handle in the route configuration rather than in export const config
Describe the bug
Suppose I want to protect my Hilla views with
loginRequired
androlesAllowed
usingViewConfig
API:and
and setting the following routes in
routes.tsx
:This has no effect unfortunately: if I log in under another user with another role, the view is accessible, and if I change to
loginRequired: false
, Hilla redirects me to/login
.If I remove
ViewConfig
from Hilla views, the behaviour is the same: the application just requires me to login.Expected-behavior
Hilla should take role into account and not require me to log in if I set
loginRequired: false
.Reproduction
Can be reproduced with the branch vaadin/flow-hilla-hybrid-example#30.
System Info
Vaadin 24.4.0.alpha17.
The text was updated successfully, but these errors were encountered: