Editing the form by the incoming person or admin

We have an initial registration form where the system assigns a code for each entry. The first 5 digits of this code represent the staff code for exp. "118220001" Based on this, we want only the form owner or admin to have editing permissions for this form."