Skip to content

Commit cf8f924

Browse files
author
Richard Jones
committed
tweak
1 parent 3897f6a commit cf8f924

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

doc/customizing.txt

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.166 $
5+
:Version: $Revision: 1.167 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -3943,20 +3943,22 @@ tracker "detectors" directory)::
39433943
So now, if an edit action attempts to set "assignedto" to a user that
39443944
doesn't have the "Fixer" Permission, the error will be raised.
39453945

3946+
39463947
Users may only edit their issues
39473948
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39483949

39493950
Users registering themselves are granted Provisional access - meaning they
39503951
have access to edit the issues they submit, but not others. We create a new
39513952
Role called "Provisional User" which is granted to newly-registered users,
39523953
and has limited access. One of the Permissions they have is the new "Edit
3953-
Own" on issues (regular users have "Edit".) We back up the permissions with
3954-
an auditor.
3954+
Own" on issues (regular users have "Edit".)
39553955

39563956
First up, we create the new Role and Permission structure in
39573957
``schema.py``::
39583958

3959+
#
39593960
# New users not approved by the admin
3961+
#
39603962
db.security.addRole(name='Provisional User',
39613963
description='New user registered via web or email')
39623964

@@ -3975,11 +3977,11 @@ First up, we create the new Role and Permission structure in
39753977

39763978
# Assign the Permissions for issue-related classes
39773979
for cl in 'file', 'msg', 'query', 'keyword':
3978-
db.security.addPermissionToRole('User', 'View', cl)
3979-
db.security.addPermissionToRole('User', 'Edit', cl)
3980-
db.security.addPermissionToRole('User', 'Create', cl)
3980+
db.security.addPermissionToRole('Provisional User', 'View', cl)
3981+
db.security.addPermissionToRole('Provisional User', 'Edit', cl)
3982+
db.security.addPermissionToRole('Provisional User', 'Create', cl)
39813983
for cl in 'priority', 'status':
3982-
db.security.addPermissionToRole('User', 'View', cl)
3984+
db.security.addPermissionToRole('Provisional User', 'View', cl)
39833985

39843986
# and give the new users access to the web and email interface
39853987
db.security.addPermissionToRole('Provisional User', 'Web Access')
@@ -3994,19 +3996,6 @@ users, replacing the existing ``'User'`` values::
39943996
new_web_user_roles = 'Provisional User'
39953997
new_email_user_roles = 'Provisional User'
39963998

3997-
Note that some older trackers might also want to change the ``page.html``
3998-
template as follows::
3999-
4000-
<p class="classblock"
4001-
- tal:condition="python:request.user.username != 'anonymous'">
4002-
+ tal:condition="python:request.user.hasPermission('View', 'user')">
4003-
<b>Administration</b><br>
4004-
<tal:block tal:condition="python:request.user.hasPermission('Edit', None)">
4005-
<a href="home?:template=classlist">Class List</a><br>
4006-
4007-
(note that the "-" indicates a removed line, and the "+" indicates an added
4008-
line).
4009-
40103999

40114000
Changes to the Web User Interface
40124001
---------------------------------
@@ -4167,6 +4156,7 @@ that shows either one or the other. We'll use a new form variable,
41674156
</tal:block>
41684157
</table>
41694158

4159+
41704160
Setting up a "wizard" (or "druid") for controlled adding of issues
41714161
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41724162

0 commit comments

Comments
 (0)