correcting generation of permission to role mapping table