[Zope-CMF] DCWorkflow small glitch
Dorneles Treméa
dorneles at x3ng.com.br
Sun Jul 18 20:19:57 EDT 2004
Hey guys,
I was playing a bit deeper with DCWorkflow and found a slighting
discrepance on getSummary method (used to display a formated text
on 'Transtions' tab inside ZMI) from Guard class on Guard module:
for idx in range(len(self.permissions)):
p = self.permissions[idx]
if idx > 0:
if idx < len(self.permissions) - 1:
res.append(';')
else:
res.append('or')
res.append('<code>' + escape(p) + '</code>')
...
for idx in range(len(self.roles)):
r = self.roles[idx]
if idx > 0:
if idx < len(self.roles) - 1:
res.append(';')
else:
res.append('or')
res.append('<code>' + escape(r) + '</code>')
When you use 'Role1; Role2; Role3' as a guard, it displays
'Requires role: Role1 ; Role2 or Role3' instead of 2 'or's...
The question is: why check for self.permissions/self.roles lenght
instead of always add 'or's?
Am I missing something or can I commit a small fix?
Regards,
--
Dorneles Treméa
Caxias do Sul - RS - Brasil
+55 54 9114 9312 - UIN: 2413568
X3ng Web Technology <http://www.x3ng.com.br>
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/IT d- s:->: a25 C+++ UBL++++$ P--- L++ E-- W+++
N++ o? K? w+ O M+ V-- PS+ PE- Y-- PGP++ t+ 5 X++ R+
tv+ b(++) DI+ D++ G+>+++ e++>++++ h---- r+++ y+++**
------END GEEK CODE BLOCK------
More information about the Zope-CMF
mailing list