function generateCurrentRoles(userRoles) {
    let matchingRoles = userRoles.map(roleID => lookupRole(globalRoleMap.allRoles, roleID))
    let orderedRoles = matchingRoles.sort((a, b) => b.priority - a.priority)

    globalRoleMap.currentRoles = orderedRoles   // globalRoleMap.currentRoles: Role[]
    renderCurrentRoles(orderedRoles)
}
// generateCurrentRoles(userRoles: string[])     // this is only used when roles are given as strings
string[])     // this is only used when roles are given as strings
string [] ) // this is only used when roles are given as strings
function generateCurrentRoles(userRoles) {
    let matchingRoles = userRoles.map(roleID => lookupRole(globalRoleMap.allRoles, roleID))
    let orderedRoles = matchingRoles.sort((a, b) => b.priority - a.priority)
    globalRoleMap.currentRoles = orderedRoles   
    renderCurrentRoles(orderedRoles)
}
function generateCurrentRoles ( userRoles ) { let matchingRoles = userRoles . map ( roleID => lookupRole ( globalRoleMap . allRoles , roleID ) ) let orderedRoles = matchingRoles . sort ( ( a , b ) => b . priority - a . priority ) globalRoleMap . currentRoles = orderedRoles renderCurrentRoles ( orderedRoles ) }
generateCurrentRoles(userRoles: string[])     // this is only used when roles are given as strings
generateCurrentRoles ( userRoles : string [] ) // this is only used when roles are given as strings
// globalRoleMap.currentRoles: Role[]