Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New Modules
Simple Security Module
@RolesAllowed
annotation on view controllerLoginViewSupport
ViewAccessManager
for granting view access to rolesLocal User Management Module
UserSubstitutionEntity
moved here from security-data moduleNew Interfaces
ServiceUserProvider
The
ServiceUserProvider
interface is used for getting system and anonymous user. Previously theUserRepository
was responsible for this.UserClassResolver
The
UserClassResolver
interface is used for getting a class that represents the user of the application. Previously theUserRepository
was responsible for this.UserAuthoritiesPopulator
The
UserAuthoritiesPopulator
class is used by database user repository for user authorities populating. In new project template the DatabaseUserRepository won't be scaffolded, onlyUserAuthoritiesPopulator
will be scaffolded instead.New Project Template Changes
DatabaseUserRepository
isn't scaffolded in the project. The bean is defined now in the core module.UiMinimalRole
andFullAccessRole
removed from the project template.AppServiceUserProvider
,AppUserAuthoritiesPopulator
,AppUserClassResolver
,ViewAccessInitializer
Working with Simple Security Module
Roles to users must be assigned in the
AppUserAuthoritiesPopulator
generated in the project. The default implementation grants ADMIN role to the "admin" user and the "USER" role to all other users.ADMIN role has access to any screen by default. The name of admin role can be configured using the
SimpleSecurityProperties
.Granting access to views from the application is done using the
@RolesAllowed
and@AnonymousAllowed
annotation (a standard Vaadin way). Role name here may be defined either with or without the "ROLE_" prefix:Granting access to views from included add-ons can be done using the
ViewAccessManager
API in the generatedViewAccessInitializer
class:To simplify finding view ids, each add-on will provide the "view index" interface (e.g.
FlowuiViewIndex
) that will provide information about views locaed in the add-on and also groups of views, e.g. "all views for filter editing"