Updating javascript that controls permission settings

- Previously the link to advanced settings would display [even] if there were no advanced settings.