Get module ID outside loop; rename variables fid, gid, mid to form_id, group_id, formulize_module_id.
Add new group permissions into the admin interface.
Save new group permissions from the admin interface.
Add functions to the group permission handler to check if a user has update or delete permissions on a form or entry, taking into account old and new permissions.
Modify the new permission check to apply to any entries where user has view form permission. Combined permission logic into a shared function.
Merge pull request #3 from jegelstaff/new-permissions

New permissions...one slight change coming up after this.