Appearance
Security Integration
The optional crudcraft-security
module adds row and field level protections to your services and DTOs.
Add the Module
Include the security module as a dependency to enable the annotations and utilities.
Apply Field Security
Annotate DTO properties with @FieldSecurity
to redact or reject access based on roles. See the Field security concept for details.
Enforce Row Security
Implement a service that checks whether the current user may read or modify a particular entity instance. Invoke it from your custom service methods before performing operations.
Combine with Spring Security
CrudCraft delegates authentication to Spring Security. Use the current principal or roles to drive your security decisions.