added some permissions handling around the header links