refactor to handle non-bubling permissions