Hello Community,
I was trying to insert data into SecurityGroup Entity using a
SecurityPermissionSeedData.xml file.
I found the group Id = "Super" in the SecurityGroup Entity, the same way I
want to create my own multiple group Ids in the SecurityGroup Entity with
different permissions using .xml.
I want to create a unique group Id for each module with different
permissions.
I tried the below code but it's not working, only securityPermission is
working.
I'm sharing an example below for you to look over.
*example: *
SecurityPermissionSeedData.xml
*steps I Followed *:
step-1) I tried to create permission using the below code
<!--creating permission for module-->
<SecurityPermission description="View operation in the Product order"
permissionId="MODULE_PRODCUTORDER_VIEW"/>
step-2) after creating permission I tried to create a securityGroup using
the below code
<SecurityGroup groupId="PRODUCTORDER_USER" description="PRODUCT ORDER
MODULE user group; all limited product order module permissions."
groupName="Product order User"/>
step-3) After creating the securityGroup I tried to add permissions to
securityGroup.
<SecurityGroupPermission fromDate="2001-05-13 12:00:00.0"
groupId="PRODUCTORDER_USER" permissionId="MODULE_PRODCUTORDER_VIEW"/>
step-4) configured SecurityGroupSeedData.xml in OfbizComponent.xml using
the below code
<entity-resource type="data" reader-name="seed" loader="main"
location="data/ SecurityPermissionSeedData.xml"/>
data is getting stored in SecurityPermission Entity but data is not storing
in SecurityGroupPermission Entity and SecurityGroup Entity.
please guide me on where I'm going wrong.
I'm also attaching the screenshot for you to have a look at.
Thank you,
Maheshwari.