def _authenticatedUserHasRole(caller, role, instance=None, shortcircuit=False):
    """ Returns true if current user has specified role """
    from AccessControl import getSecurityManager
    user = getSecurityManager().getUser()
    roles = user.getRoles()
    if shortcircuit == True and 'Manager' in roles:
        return True
    if instance:
        roles = user.getRolesInContext(instance)
    if isinstance(role, list):
        for r in role:
            if r in roles:
                return True
        return False
    return role in roles
