[ckan-dev] Log in option removal

Judith Moran Judith.Moran at nt.gov.au
Wed Apr 3 03:21:55 UTC 2019


Hi,

My Manager wants to hide the Log in option  and Register Option on each page in the CKAN header.

I found this in the code below in the  header.html, moved to our theme directory and removed ('Log in') so have ('').

When I move around to different pages an error appears where the Log in would have been.

Would it be better just to comment out the complete Nav section, but then how does the administrator log in if this option is removed??

I have hidden the Register by setting

    <nav class="account not-authed">
      <ul class="list-unstyled">
        {% block header_account_notlogged %}
        <li>{% link_for _('Log in'), named_route='user.login' %}</li>
        {% if h.check_access('user_create') %}
        <li>{% link_for _('Register'), named_route='user.register', class_='sub' %}</li>
        {% endif %} {% endblock %}
      </ul>
    </nav>


I update production.ini parameter to false to remove the Registration option.

ckan.auth.create_user_via_web = false

Can anyone assist with removing the log in option but still allowing Adminstrators to log in.



Regards,



Judy Moran
Manager Data Strategy
Department of Corporate and Information Services
Northern Territory Government of Australia
T:  892 96550
E:  DataStrategy.NTG at nt.gov.au<mailto:DataStrategy.NTG at nt.gov.au>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20190403/809280c5/attachment.html>


More information about the ckan-dev mailing list