X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/afa2b5ca9e29a5f2f3dfa8f94a5be2f9e612d719..98a02b22ef42fe3a91b15baabb25889725b13a9e:/forum/registry.py diff --git a/forum/registry.py b/forum/registry.py index 871f1e5..7fb8292 100644 --- a/forum/registry.py +++ b/forum/registry.py @@ -25,10 +25,15 @@ ui.register(ui.HEADER_LINKS, ui.Link(_('about'), ui.Url('about'), weight=300, name='ABOUT'), ui.Link( - text=lambda u, c: u.is_authenticated() and _('logout') or _('login'), - url=lambda u, c: u.is_authenticated() and reverse('logout') or reverse('auth_signin'), - weight=200, name='LOGIN/OUT'), - + visibility=ui.Visibility.ANONYMOUS, + text=_('login'), + url=lambda u, c: reverse('auth_signin'), + weight=200, name='LOGIN'), + ui.Link( + visibility=ui.Visibility.AUTHENTICATED, + text=_('logout'), + url=lambda u, c: reverse('logout'), + weight=200, name='LOGOUT'), ui.Link( visibility=ui.Visibility.AUTHENTICATED, text=lambda u, c: smart_unicode(u.username),