I might be wrong but you could still use django template syntax in javascript, because django template is evaluated before the page is loaded, so it still works by hiding/showing the portion that's relevant to the specific user: