
from django.conf.urls import url

from . import help as views


urlpatterns = [
    # having two urls for one page is a hack to help the current url/menu
    # system highlight the correct menu item. Every submenu-item with the same
    # url prefix as the main-menu is highlighted automatically.
    url(r'^help/$', views.index, name='index'),
    url(r'^help/index/$', views.index, name='index_explicit'),
    url(r'^help/about/$', views.about, name='about'),
    url(r'^help/manual/$', views.manual, name='manual'),
    url(r'^help/status-log/$', views.status_log, name='status-log'),
]


from django.conf.urls import url

from plinth.utils import non_admin_view

from . import help as views


urlpatterns = [
    # having two urls for one page is a hack to help the current url/menu
    # system highlight the correct menu item. Every submenu-item with the same
    # url prefix as the main-menu is highlighted automatically.
    url(r'^help/$', non_admin_view(views.index), name='index'),
    url(r'^help/index/$', non_admin_view(views.index), name='index_explicit'),
    url(r'^help/about/$', non_admin_view(views.about), name='about'),
    url(r'^help/manual/$', non_admin_view(views.manual), name='manual'),
    url(r'^help/status-log/$', non_admin_view(views.status_log), name='status-log'),
]

Make help accessible for logged-in non-admin users
Make help accessible for logged-in non-admin users

Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>

Reviewed-by: Johannes Keyser <187051b70230423a457adbc3e507f9e4fff08d4b@posteo.de>

  
  from django.conf.urls import url
+ 
+ from plinth.utils import non_admin_view
  
  from . import help as views
  
  
  urlpatterns = [
      # having two urls for one page is a hack to help the current url/menu
      # system highlight the correct menu item. Every submenu-item with the same
      # url prefix as the main-menu is highlighted automatically.
-     url(r'^help/$', views.index, name='index'),
+     url(r'^help/$', non_admin_view(views.index), name='index'),
-     url(r'^help/index/$', views.index, name='index_explicit'),
+     url(r'^help/index/$', non_admin_view(views.index), name='index_explicit'),
-     url(r'^help/about/$', views.about, name='about'),
+     url(r'^help/about/$', non_admin_view(views.about), name='about'),
-     url(r'^help/manual/$', views.manual, name='manual'),
+     url(r'^help/manual/$', non_admin_view(views.manual), name='manual'),
-     url(r'^help/status-log/$', views.status_log, name='status-log'),
+     url(r'^help/status-log/$', non_admin_view(views.status_log), name='status-log'),
  ]
  
Make help accessible for logged-in non-admin users
## Code Before:

from django.conf.urls import url

from . import help as views


urlpatterns = [
    # having two urls for one page is a hack to help the current url/menu
    # system highlight the correct menu item. Every submenu-item with the same
    # url prefix as the main-menu is highlighted automatically.
    url(r'^help/$', views.index, name='index'),
    url(r'^help/index/$', views.index, name='index_explicit'),
    url(r'^help/about/$', views.about, name='about'),
    url(r'^help/manual/$', views.manual, name='manual'),
    url(r'^help/status-log/$', views.status_log, name='status-log'),
]

## Instruction:
Make help accessible for logged-in non-admin users
## Code After:

from django.conf.urls import url

from plinth.utils import non_admin_view

from . import help as views


urlpatterns = [
    # having two urls for one page is a hack to help the current url/menu
    # system highlight the correct menu item. Every submenu-item with the same
    # url prefix as the main-menu is highlighted automatically.
    url(r'^help/$', non_admin_view(views.index), name='index'),
    url(r'^help/index/$', non_admin_view(views.index), name='index_explicit'),
    url(r'^help/about/$', non_admin_view(views.about), name='about'),
    url(r'^help/manual/$', non_admin_view(views.manual), name='manual'),
    url(r'^help/status-log/$', non_admin_view(views.status_log), name='status-log'),
]
