refactored role to resource mapping