Hi Aldo,
As you've noticed, your module (as all modules) is inheriting this rule:
module {
requiredPermissionIds:$${ariba.appcore.Initialization.moduleClassViewPermissions(this)}
visible:${ariba.appcore.User.currentUser().hasPermissions(properties.requiredPermissionIds, false)}
}
So, the set of permissions its look for is from ariba.appcore.Initialization.moduleClassViewPermissions().
Looking at that method you'll see:
... String [] types = {"homeForClasses", "showsClasses" };
... Permission.nameForClassOp((String)object, Permission.ClassOperation.view));
I.e. it's assembling the list of "view" permissions for the classes defined on the module's homeForClasses and showsClasses properties. Of course, in the case of your custom module, any defined...
You could solve your problem by adding this property decl:
@module=myapp.module.MyCustomerHome {
homeForClasses: [myapp.module.MyCustomerHome];
...
Still, that's a bit bogus: the "classes" here really are supposed to be @Entity style domain classes, not module names.
Better would be to change the list of permissions that the visibility rule is looking for (which you'll notice in the rule from appcore is 'requiredPermissionIds'). So, you could do this:
@module=myapp.module.MyCustomerHome {
requiredPermissionIds:
$${[ariba.appcore.PermissionSet.idForPermissionName("myapp.module.MyCustomerHome:view")]};
...
Of course, you don't really need to use this ":view" convention for your module permission, and you don't need to use a class-style name for your module name, so you could write:
@module=.MyCustomerHome {
requiredPermissionIds:
$${[ariba.appcore.PermissionSet.idForPermissionName("module.MyCustomerHome")]};
...
- craig