This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/causeway-app-petclinic.git

commit d4da7fdc3c60f85ebbf367feb9dd8f721ba9bdf5
Author: Dan Haywood <[email protected]>
AuthorDate: Sun May 26 20:29:39 2024 +0100

    Adds 'visit' namespace to existing petowners security role.
    
    ... and renames petowner superuser role
---
 .../webapp/application/seed/CustomRolesAndUsers.java       | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/webapp/src/main/java/domainapp/webapp/application/seed/CustomRolesAndUsers.java
 
b/webapp/src/main/java/domainapp/webapp/application/seed/CustomRolesAndUsers.java
index 1d4d11c..3cb40c1 100644
--- 
a/webapp/src/main/java/domainapp/webapp/application/seed/CustomRolesAndUsers.java
+++ 
b/webapp/src/main/java/domainapp/webapp/application/seed/CustomRolesAndUsers.java
@@ -20,16 +20,16 @@ public class CustomRolesAndUsers extends FixtureScript {
     protected void execute(ExecutionContext executionContext) {
         executionContext.executeChildren(this,
                 new SimpleModuleSuperuserRole(),
-                new PetOwnerModuleSuperuserRole(),
+                new PetClinicSuperuserRole(),
                 new SvenUser());
     }
 
-    private static class PetOwnerModuleSuperuserRole extends 
AbstractRoleAndPermissionsFixtureScript {
+    private static class PetClinicSuperuserRole extends 
AbstractRoleAndPermissionsFixtureScript {
 
-        public static final String ROLE_NAME = "petowner-superuser";
+        public static final String ROLE_NAME = "petclinic-superuser";
 
-        public PetOwnerModuleSuperuserRole() {
-            super(ROLE_NAME, "Permission to use everything in the 'petowner' 
module");
+        public PetClinicSuperuserRole() {
+            super(ROLE_NAME, "Permission to use everything in the 'petowner' 
and 'visit' modules");
         }
 
         @Override
@@ -37,7 +37,7 @@ public class CustomRolesAndUsers extends FixtureScript {
             newPermissions(
                     ApplicationPermissionRule.ALLOW,
                     ApplicationPermissionMode.CHANGING,
-                    Can.of(ApplicationFeatureId.newNamespace("petowner"))
+                    Can.of(ApplicationFeatureId.newNamespace("petowner"), 
ApplicationFeatureId.newNamespace("visit"))
             );
         }
     }
@@ -70,7 +70,7 @@ public class CustomRolesAndUsers extends FixtureScript {
             public Can<String> get() {
                 return Can.of(
                         
causewayConfiguration.getExtensions().getSecman().getSeed().getRegularUser().getRoleName(),
 // built-in stuff
-                        PetOwnerModuleSuperuserRole.ROLE_NAME,
+                        PetClinicSuperuserRole.ROLE_NAME,
                         SimpleModuleSuperuserRole.ROLE_NAME
                         );
             }

Reply via email to