Skip to content

Commit bdf8fc3

Browse files
committed
Fix [SF#1599740]
1 parent 61ec6e5 commit bdf8fc3

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ are given with the most recent entry first.
44

55
2006-??-?? 1.3.2
66
Fixed:
7+
- relax rules for required fields in form_parser.py (sf bug 1599740)
78
- documentation cleanup from Luke Ross (sf patch 1594860)
89
- updated Spanish translation from Ramiro Morales (sf patch 1594718)
910

ChangeLog

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2006-11-22 Stefan Seefeld <[email protected]>
2+
3+
* roundup/cgi/form_parser.py: Allow required fields to be ommitted
4+
if user doesn't have edit permission and the value is already set.
5+
16
2001-08-03 11:54 richard
27

38
* BUILD.txt, CHANGES.txt, README.txt, setup.py,
@@ -872,7 +877,10 @@
872877

873878
* cgitb.py, config.py, date.py, hyperdb.py, roundup-mailgw.py,
874879
roundup.py, roundup_cgi.py, roundupdb.py, server.py, template.py:
875-
Added CVS keywords $Id: ChangeLog,v 1.7 2001-08-03 02:12:07 anthonybaxter Exp $ and $Log: not supported by cvs2svn $ to all python files.
880+
Added CVS keywords $Id: ChangeLog,v 1.8 2006-11-23 00:44:48 stefan Exp $ and $Log: not supported by cvs2svn $
881+
Added CVS keywords $Id: ChangeLog,v 1.8 2006-11-23 00:44:48 stefan Exp $ and Revision 1.7 2001/08/03 02:12:07 anthonybaxter
882+
Added CVS keywords $Id: ChangeLog,v 1.8 2006-11-23 00:44:48 stefan Exp $ and regenerated on Fri Aug 3 12:12:00 EST 2001
883+
Added CVS keywords $Id: ChangeLog,v 1.8 2006-11-23 00:44:48 stefan Exp $ and to all python files.
876884

877885
2001-07-19 15:46 anthonybaxter
878886

roundup/cgi/form_parser.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,19 @@ def parse(self, create=0, num_re=re.compile('^\d+$')):
526526
if got.has_key(entry):
527527
required.remove(entry)
528528

529+
# If a user doesn't have edit permission for a given property,
530+
# but the property is already set in the database, we don't
531+
# require a value.
532+
if not (create or nodeid is None):
533+
for entry in required[:]:
534+
if not self.db.security.hasPermission('Edit',
535+
self.client.userid,
536+
self.classname,
537+
entry):
538+
cl = self.db.classes[self.classname]
539+
if cl.get(nodeid, entry) is None:
540+
required.remove(entry)
541+
529542
# any required values not present?
530543
if not required:
531544
continue

0 commit comments

Comments
 (0)