X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/2058efeef13c648867d0810a98da1f7aea8f64ba..f3fa23854f0192e9bcf5bf6ee2bd731f2f003900:/forum/views/admin.py diff --git a/forum/views/admin.py b/forum/views/admin.py index 4823920..da9dc67 100644 --- a/forum/views/admin.py +++ b/forum/views/admin.py @@ -57,6 +57,10 @@ def admin_page_wrapper(fn, request, *args, **kwargs): context['tools'] = [(name, fn.label) for name, fn in TOOLS.items()] + # Show the navigation only to moderators and super users + if not context.has_key("hide_navigation"): + context['hide_navigation'] = not request.user.is_superuser + unsaved = request.session.get('previewing_settings', {}) context['unsaved'] = set([getattr(settings, s).set.name for s in unsaved.keys() if hasattr(settings, s)]) @@ -572,7 +576,7 @@ def node_management(request): 'state_types': state_types, 'authors': authors, 'tags': tags, - 'hide_menu': True + 'hide_navigation': True })) @csrf_exempt