vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
621 stars 167 forks source link

Access control does not work properly when using @Layout with Hilla views #20097

Closed Artur- closed 1 month ago

Artur- commented 1 month ago

Description of the bug

If you have a Hilla view that is rendered inside a @Layout Java layout, then access to the Hilla view is always denied

Expected behavior

Access control is based on the Hilla view settings

Minimal reproducible example

start.vaadin.com -> add a hilla view with AC "logged in" -> download -> select flow main layout

Versions

Hilla: 24.5.0.beta4 Flow: 24.5.0.beta3 Vaadin: 24.5.0.beta4 Copilot: 24.5.0.beta3 Frontend Hotswap: Enabled, using Vite OS: aarch64 Mac OS X 15.0 Java: JetBrains s.r.o. 21.0.3 Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Java Hotswap: false IDE Plugin: ☑ 1.0.0

mshabarov commented 1 month ago

Acceptance Criteria:

This table represents the requirements for all the combinations for Flow/Hilla main layouts vs access control rules:

Screenshot 2024-10-02 at 14 25 32