def METHOD_NAME(self):
    """
    Render navbar from home page with restricted UI set to True.
    This restricts the user to be able to view ONLY relationships on the navbar.
    It then checks the UI for these restrictions.
    """
    self.add_permissions("extras.view_relationship")
    user_permissions = self.user.get_all_permissions()
    self.browser.visit(self.live_server_url)
    for tab_name, groups in self.navbar.items():
        tab_flag = False
        for _, items in groups.items():
            for _, item_details in items.items():
                if item_details["permission"] in user_permissions:
                    tab_flag = True
        # XPath to find tabs using the tab name
        tabs = self.browser.find_by_xpath(f"//*[@id='navbar']//*[contains(text(), '{tab_name}')]")
        if tab_flag:
            self.assertEqual(len(tabs), 1)
        else:
            self.assertEqual(len(tabs), 0)