Added a bootstrap file that contains  a variable of the model that contains the user roles (normally Group or Role).
Moved $permissionTypes into a private variable in the group.

Collecting the userRoleModel variable instead of hard coding ‘Group’.
Added a beforeFind function that reads the userRoleModel variable to set the underlying table for the model.