'No page permissions in vaadin

I'm just getting started with vaadin and the roles don't work for me. The class responsible for creating a new user is in /views/users/NewUser.java. Everywhere I get this: My error

Link to repo on github: https://github.com/Rozumek29/plantseeker-panel



Solution 1:[1]

I just ran you project (branch bb01af6) and it seems to work just fine. Since I did not have a MYSQL instance I used H2 instead. No other changes was done to run your project. As admin I was able to create a user without any issues.

Couple of recommendations. I would change New User route to use the layout class from @Route("panel/users/add") to @Route(value="panel/users/add", layout = MainLayout.class). I would also use Vaadin Binder instead of doing the binding myself. With a proper binder it is easy to use .asRequired() and .withValidation(...).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1