Hello,
In your case you have to prepare one secondary xml file which contains two groups and in that list you have to add the list to submit and editing permission users. In onLoad code, you have to verify the login user is available in edit permission is there or not for submitted form and check the login user is available in submit permission for new form. Based on this we can open the form otherwise we can close the form with message prompt.
Your secondary xml file should be;
<Permissions>
<Group name='Submit'>
<User>aaa</User>
<User>bbb</User>
</Group>
<Group name='Edit'>
<User>ccc</User>
<User>ddd</User>
</Group>
</Permissions>
Another way is you use User Roles in InfoPath forms.