in src/main/java/domainapp/webapp/AppManifest.java [62:83]
public SimpleRealm simpleAuthRealm(final PasswordEncoder passwordEncoder) {
var hashedPass = passwordEncoder.encode("pass");
return new SimpleRealm()
.addRole("admin_role", id->Grant.CHANGE)
.addRole("hello_role", id->
id.getFullIdentityString().contains("HelloWorldObject")
? Grant.CHANGE
: Grant.NONE)
.addRole("default_role", id->
id.getLogicalType().getNamespace().startsWith("causeway.applib")
|| id.getLogicalType().getNamespace().startsWith("causeway.security")
? Grant.CHANGE
: Grant.NONE)
.addRole("fixtures_role", id->
id.getLogicalType().getNamespace().startsWith("causeway.testing.fixtures")
? Grant.CHANGE
: Grant.NONE)
.addUser("sven", hashedPass, List.of("admin_role"))
.addUser("dick", hashedPass, List.of("hello_role", "default_role"))
.addUser("bob", hashedPass, List.of("hello_role", "default_role", "fixtures_role"))
.addUser("joe", hashedPass, List.of("hello_role", "default_role"));
}