added a way to base access on the layout and not just the whole component