Roundup Tracker - Issues

Issue 1599740

classification
Allow form to omit required fields if not is_edit_ok
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed fixed
:
: stefan : richard, stefan
Priority: normal :

Created on 2006-11-20 14:00 by stefan, last changed 2006-11-23 00:24 by richard.

Files
File name Uploaded Description Edit Remove
patch stefan, 2006-11-20 14:00
Messages
msg2350 Author: [hidden] (stefan) Date: 2006-11-20 14:00
Right now forms have to provide values for all
required fields unconditionally.

The templating code already checks for is_edit_ok,
and only generates form fields for those properties
that the user has edit permission for.

However, if the user doesn't have edit permission
for a required field, the html template has to
provide a hidden input with the old value, to
satisfy the validity check in cgi/form_parser.py.

The attached patch enhances the form parser by
allowing those required fields to be omitted if
the user doesn't have edit permission and the
property is already set in the database.
msg2351 Author: [hidden] (richard) Date: 2006-11-23 00:24
Patch looks good, though:

1. I'd prefer without the print statement :)
2. cl.get(nodeid, entry) could return a false value for eg. Boolean
   -- it would be better to check for "is None".

Please apply the patch once you've fixed the above. Please consider also adding a unit test.
History
Date User Action Args
2006-11-20 14:00:38stefancreate