comparison doc/upgrading.txt @ 8535:4184173d364f

bug: make web page follow login_empty_passwords setting. remove the required attribute from password input in the the html templates if login_empty_passwords is enabled in config.ini. Also document in upgrading.txt.
author John Rouillard <rouilj@ieee.org>
date Wed, 18 Mar 2026 17:49:16 -0400
parents 00aec15117c0
children 1ffa1f42e1da
comparison
equal deleted inserted replaced
8534:1f8492d68aca 8535:4184173d364f
234 with:: 234 with::
235 235
236 tal:attributes="onblur python:'split_name(this)' if edit_ok else ''; 236 tal:attributes="onblur python:'split_name(this)' if edit_ok else '';
237 237
238 in the ``html/page.html`` file in your tracker. 238 in the ``html/page.html`` file in your tracker.
239
240 Allow users without a password to log in (optional)
241 ---------------------------------------------------
242
243 You can configure a tracker to allow a login without a password.
244 However the default html templates require the password field to
245 be filled in. This prevents a login with an empty password.
246
247 If you don't want to allow a login without a password, you can
248 skip this section.
249
250 This change automatically removes the required attribute if the
251 ``config.ini`` ``login_empty_passwords`` setting is enabled
252 (true). The default is disabled with the value ``no``).
253
254 This change is the default for the tracker templates in 2.6 and
255 newer.
256
257 To add this to your tracker, change the ``page.html`` (for TAL
258 based trackers) or ``layout/navigation.html (for jinja2 trackers).
259
260 For TAL trackers, replace the ``required`` parameter by finding
261 the following password input in the tracker's ``html/page.html``
262 file::
263
264 <input size="10" spellcheck="false" type="password" required name="__login_password"><br>
265
266 and modifying it to look like::
267
268 <input size="10" spellcheck="false" type="password"
269 tal:attributes="required python: 'required'
270 if not db.config.WEB_LOGIN_EMPTY_PASSWORDS else nothing"
271 name="__login_password"><br>
272
273 The equivalent change for jinja2's
274 ``html/layout/navigation.html`` based template starts with::
275
276 <input class="form-control form-control-sm" spellcheck="false" type="password" required name="__login_password" placeholder='password'>
277
278 and changes to::
279
280 <input class="form-control form-control-sm" spellcheck="false" type="password" name="__login_password" placeholder='password' {{ "required" if not db.config.WEB_LOGIN_EMPTY_PASSWORDS }}>
281
239 282
240 .. index:: Upgrading; 2.4.0 to 2.5.0 283 .. index:: Upgrading; 2.4.0 to 2.5.0
241 284
242 Migrating from 2.4.0 to 2.5.0 285 Migrating from 2.4.0 to 2.5.0
243 ============================= 286 =============================

Roundup Issue Tracker: http://roundup-tracker.org/