This is an automated email from the ASF dual-hosted git repository. ahuber pushed a commit to branch jpa3-SNAPSHOT in repository https://gitbox.apache.org/repos/asf/causeway-app-helloworld.git
commit a2922590ae8c7d425fc28fee516f211278cd18d1 Merge: 8067a41 0bb6726 Author: Andi Huber <[email protected]> AuthorDate: Thu Mar 21 13:43:33 2024 +0100 merge from jpa2 pom.xml | 4 +- src/main/java/domainapp/webapp/AppManifest.java | 40 +++++++- src/main/java/domainapp/webapp/HelloWorldApp.java | 49 ---------- src/main/java/domainapp/webapp/SimpleAuth.java | 106 ---------------------- 4 files changed, 41 insertions(+), 158 deletions(-) diff --cc pom.xml index 51818b9,672ecc6..074fc72 --- a/pom.xml +++ b/pom.xml @@@ -19,7 -20,7 +19,7 @@@ <packaging>jar</packaging> <properties> - <java.version>21</java.version> - <java.version>11</java.version> ++ <java.version>17</java.version> <!-- https://stackoverflow.com/questions/38983934/cannot-get-maven-project-version-property-in-a-spring-application-with-value/38983935#38983935 --> <resource.delimiter>^</resource.delimiter> </properties> diff --cc src/main/java/domainapp/webapp/HelloWorldApp.java index a67f5fa,9ad441f..f77c731 --- a/src/main/java/domainapp/webapp/HelloWorldApp.java +++ b/src/main/java/domainapp/webapp/HelloWorldApp.java @@@ -22,47 -13,7 +13,7 @@@ import org.apache.causeway.core.config. }) public class HelloWorldApp extends SpringBootServletInitializer { - @Configuration - static class SimpleAuthSetup { - - /* migrated from shiro.ini - [users] - sven = pass, admin_role - dick = pass, hello_role, default_role - bob = pass, hello_role, default_role, fixtures_role - joe = pass, hello_role, default_role - - [roles] - hello_role = *:HelloWorldObjects:*:*,\ - *:HelloWorldObject:*:* - admin_role = * - default_role = causeway.applib,\ - causeway.security - fixtures_role = causeway.testing.fixtures - features_role = causeway.feat - metamodel_role = causeway.metamodel - h2_role = causeway.ext.h2Console - jdo_role = causeway.persistence.jdo - swagger_role = causeway.viewer.restfulobjects - conf_role = causeway.conf - sudo_role = causeway.sudo - */ - @Bean - public SimpleAuth.Realm simpleAuthRealm() { - return new Realm() - .addRole("hello_role", id->id.getFullIdentityString().contains("HelloWorldObject")) - .addRole("admin_role", id->true) - .addRole("default_role", id->id.getFullIdentityString().startsWith("causeway.applib") - || id.getFullIdentityString().startsWith("causeway.security")) - .addRole("fixtures_role", id->id.getFullIdentityString().startsWith("causeway..testing.fixtures")) - .addUser("sven", "pass", List.of("admin_role")) - .addUser("dick", "pass", List.of("hello_role", "default_role")) - .addUser("bob", "pass", List.of("hello_role", "default_role", "fixtures_role")) - .addUser("joe", "pass", List.of("hello_role", "default_role")); - } - } - - public static void main(String[] args) { + public static void main(final String[] args) { CausewayPresets.prototyping(); // or run with use -DPROTOTYPING=true SpringApplication.run(new Class[] { HelloWorldApp.class }, args); }
