[ckan-dev] Log in option removal
Neuvonen Samuli
samuli.neuvonen at ymparisto.fi
Wed Apr 3 04:30:49 UTC 2019
Hello Judith,
We have created our own theme (https://docs.ckan.org/en/2.8/theming/index.html) and there we have removed the login in templates/header.html just as you expected, by commenting out the line
<!-- <li>{% link_for _('Log in'), controller='user', action='login' %}</li> -->
All our registered users, including admins, login by going directly to login-page's URL i.e.
https://demo.ckan.org/user/login
Regards,
Samuli
From: ckan-dev [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of Judith Moran
Sent: 3. huhtikuuta 2019 6:39
To: CKAN Development Discussions
Subject: Re: [ckan-dev] Log in option removal
Oops took a sentence out which was in the incorrect place
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??
<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 updated 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/60abbd7f/attachment-0002.html>
More information about the ckan-dev
mailing list