Open mshabarov opened 3 years ago
Surely using @RolesAllowed
in the example code is a typo?
It's not a typo, but a mistake: it's better to use a separate annotation if we talk about permissions. A new one, let's say @PermissionsAllowed
should be created. Example code will be updated.
Some background explaining why this feature is useful (and when): https://youtu.be/U6CeaA-Phqo?t=2183
So, any plans for this feature?
Description of the bug / feature
Flow views can be protected by
@RolesAllowed
annotation and that gives an opportunity to list the roles of users allowed to see a single view, likeSUPER-ADMIN
,ADMIN
,USER
etc.In a complex applications it might be required and more convenient to use a permissions for accessing the views, instead of just roles. 'Permission' in this context stands for any authority differs from role (having a 'ROLE_' prefix). The following example shows how it might look like:
Default implementation of view-based access control in Vaadin uses the roles approach. And if a security configuration (for example, Spring Security) will be changed to work with something else than the
ROLE_
, e.g.PERM_
, then the view access wouldn't work with it out-of-the-box.Acceptance criteria