def getRoleLevel(role_str):
    """
    Helper function to calculate role level from the role string
    :param role_str str: The role level string
    :returns: the level of the role as a integer 
    """
    role_level = 0
    if role_str == 'quests':
        role_level = 1
    elif role_str == 'default_users':
        role_level = 2
    elif role_str == 'station_managers':
        role_level = 3
    elif role_str == 'admins':
        role_level = 4
    elif role_str == 'owner':
        role_level = 5
    else:
        raise Exception("No such role in the system! ({0})".format(role_str))

    return role_level