Mercurial > p > roundup > code
changeset 3079:64df8d65cc54
fix "Users may only edit their issues"
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 05 Jan 2005 22:35:31 +0000 |
| parents | 2fee36128471 |
| children | 29bd9f06160e |
| files | CHANGES.txt doc/customizing.txt |
| diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Wed Jan 05 22:28:32 2005 +0000 +++ b/CHANGES.txt Wed Jan 05 22:35:31 2005 +0000 @@ -12,6 +12,7 @@ - fix port number as int in mysql connection info (sf bug 1082530) - fix setup.py to work with <Python2.3 (sf bug 1082801) - fix permissions checks in cgi templating (sf bug 1082755) +- fix "Users may only edit their issues" example in docs 2004-12-08 0.8.0b1
--- a/doc/customizing.txt Wed Jan 05 22:28:32 2005 +0000 +++ b/doc/customizing.txt Wed Jan 05 22:35:31 2005 +0000 @@ -2,7 +2,7 @@ Customising Roundup =================== -:Version: $Revision: 1.163 $ +:Version: $Revision: 1.164 $ .. This document borrows from the ZopeBook section on ZPT. The original is at: http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx @@ -3931,10 +3931,10 @@ def own_issue(db, userid, itemid): '''Determine whether the userid matches the creator of the issue.''' return userid == db.issue.get(itemid, 'creator') - p = db.security.addPermission(name='Edit Own Issues', klass='issue', + p = db.security.addPermission(name='Edit', klass='issue', code=own_issue, description='Can only edit own issues') db.security.addPermissionToRole('Provisional User', p) - p = db.security.addPermission(name='View Own Issues', klass='issue', + p = db.security.addPermission(name='View', klass='issue', code=own_issue, description='Can only view own issues') db.security.addPermissionToRole('Provisional User', p)
