Mercurial > p > roundup > code
annotate roundup/templates/classic/dbinit.py @ 1073:cf30c6cdca02
More documentation.
Simplified the "klass", "item" and "*classname*" variables into "context.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 09 Sep 2002 00:45:06 +0000 |
| parents | fec6af48558b |
| children | 04a6b3bfbf23 |
| rev | line source |
|---|---|
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
1 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
3 # This module is free software, and you may redistribute it and/or modify |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
4 # under the same terms as Python, so long as this copyright message and |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
5 # disclaimer are retained in their original form. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
6 # |
| 214 | 7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
10 # POSSIBILITY OF SUCH DAMAGE. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
11 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
17 # |
|
1007
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
18 # $Id: dbinit.py,v 1.25 2002-09-02 07:00:22 richard Exp $ |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
19 |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
20 import os |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
21 |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
22 import instance_config |
|
858
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
23 from select_db import Database, Class, FileClass, IssueClass |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
24 |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
25 def open(name=None): |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
26 ''' as from the roundupdb method openDB |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
27 ''' |
|
270
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
28 from roundup.hyperdb import String, Password, Date, Link, Multilink |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
29 |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
30 # open the database |
|
524
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
31 db = Database(instance_config, name) |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
32 |
|
748
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
33 # |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
34 # Now initialise the schema. Must do this each time the database is |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
35 # opened. |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
36 # |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
37 |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
38 # Class automatically gets these properties: |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
39 # creation = Date() |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
40 # activity = Date() |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
41 # creator = Link('user') |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
42 pri = Class(db, "priority", |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
43 name=String(), order=String()) |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
44 pri.setkey("name") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
45 |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
46 stat = Class(db, "status", |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
47 name=String(), order=String()) |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
48 stat.setkey("name") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
49 |
|
60
e9735680d5b3
Oops - accidentally duped the keywords class
Richard Jones <richard@users.sourceforge.net>
parents:
57
diff
changeset
|
50 keyword = Class(db, "keyword", |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
51 name=String()) |
|
60
e9735680d5b3
Oops - accidentally duped the keywords class
Richard Jones <richard@users.sourceforge.net>
parents:
57
diff
changeset
|
52 keyword.setkey("name") |
|
872
bd6211d39328
Saving, running & editing queries.
Gordon B. McMillan <gmcm@users.sourceforge.net>
parents:
858
diff
changeset
|
53 |
|
bd6211d39328
Saving, running & editing queries.
Gordon B. McMillan <gmcm@users.sourceforge.net>
parents:
858
diff
changeset
|
54 query = Class(db, "query", |
|
bd6211d39328
Saving, running & editing queries.
Gordon B. McMillan <gmcm@users.sourceforge.net>
parents:
858
diff
changeset
|
55 klass=String(), name=String(), |
|
bd6211d39328
Saving, running & editing queries.
Gordon B. McMillan <gmcm@users.sourceforge.net>
parents:
858
diff
changeset
|
56 url=String()) |
|
bd6211d39328
Saving, running & editing queries.
Gordon B. McMillan <gmcm@users.sourceforge.net>
parents:
858
diff
changeset
|
57 query.setkey("name") |
|
bd6211d39328
Saving, running & editing queries.
Gordon B. McMillan <gmcm@users.sourceforge.net>
parents:
858
diff
changeset
|
58 |
|
905
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
59 # Note: roles is a comma-separated string of Role names |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
60 user = Class(db, "user", |
|
270
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
61 username=String(), password=Password(), |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
62 address=String(), realname=String(), |
|
617
edd210915e64
Alternate email addresses are now available for users.
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
63 phone=String(), organisation=String(), |
|
905
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
64 alternate_addresses=String(), |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
65 queries=Multilink('query'), roles=String()) |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
66 user.setkey("username") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
67 |
|
748
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
68 # FileClass automatically gets these properties: |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
69 # content = String() [saved to disk in <instance home>/db/files/] |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
70 # (it also gets the Class properties creation, activity and creator) |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
71 msg = FileClass(db, "msg", |
|
1007
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
72 author=Link("user", do_journal='no'), |
|
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
73 recipients=Multilink("user", do_journal='no'), |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
74 date=Date(), summary=String(), |
|
475
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
75 files=Multilink("file"), |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
76 messageid=String(), inreplyto=String()) |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
77 |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
78 file = FileClass(db, "file", |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
79 name=String(), type=String()) |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
80 |
|
748
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
81 # IssueClass automatically gets these properties: |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
82 # title = String() |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
83 # messages = Multilink("msg") |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
84 # files = Multilink("file") |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
85 # nosy = Multilink("user") |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
86 # superseder = Multilink("issue") |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
87 # (it also gets the Class properties creation, activity and creator) |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
88 issue = IssueClass(db, "issue", |
|
60
e9735680d5b3
Oops - accidentally duped the keywords class
Richard Jones <richard@users.sourceforge.net>
parents:
57
diff
changeset
|
89 assignedto=Link("user"), topic=Multilink("keyword"), |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
90 priority=Link("priority"), status=Link("status")) |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
91 |
|
905
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
92 # |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
93 # SECURITY SETTINGS |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
94 # |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
95 # new permissions for this schema |
|
988
e02093543d59
allow perms on user class
Richard Jones <richard@users.sourceforge.net>
parents:
928
diff
changeset
|
96 for cl in 'issue', 'file', 'msg', 'user': |
|
905
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
97 db.security.addPermission(name="Edit", klass=cl, |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
98 description="User is allowed to edit "+cl) |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
99 db.security.addPermission(name="View", klass=cl, |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
100 description="User is allowed to access "+cl) |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
101 |
|
928
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
102 # Assign the access and edit permissions for issue, file and message |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
103 # to regular users now |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
104 for cl in 'issue', 'file', 'msg': |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
105 p = db.security.getPermission('View', cl) |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
106 db.security.addPermissionToRole('User', p) |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
107 p = db.security.getPermission('Edit', cl) |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
108 db.security.addPermissionToRole('User', p) |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
109 # and give the regular users access to the web and email interface |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
110 p = db.security.getPermission('Web Access') |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
111 db.security.addPermissionToRole('User', p) |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
112 p = db.security.getPermission('Email Access') |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
113 db.security.addPermissionToRole('User', p) |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
114 |
| 1002 | 115 # May users view other user information? Comment these lines out |
| 116 # if you don't want them to | |
| 117 p = db.security.getPermission('View', 'user') | |
| 118 db.security.addPermissionToRole('User', p) | |
| 119 | |
|
905
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
120 # Assign the appropriate permissions to the anonymous user's Anonymous |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
121 # Role. Choices here are: |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
122 # - Allow anonymous users to register through the web |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
123 p = db.security.getPermission('Web Registration') |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
124 db.security.addPermissionToRole('Anonymous', p) |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
125 # - Allow anonymous (new) users to register through the email gateway |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
126 p = db.security.getPermission('Email Registration') |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
127 db.security.addPermissionToRole('Anonymous', p) |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
128 # - Allow anonymous users access to the "issue" class of data |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
129 # Note: this also grants access to related information like files, |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
130 # messages, statuses etc that are linked to issues |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
131 #p = db.security.getPermission('View', 'issue') |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
132 #db.security.addPermissionToRole('Anonymous', p) |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
133 # - Allow anonymous users access to edit the "issue" class of data |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
134 # Note: this also grants access to create related information like |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
135 # files and messages etc that are linked to issues |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
136 #p = db.security.getPermission('Edit', 'issue') |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
137 #db.security.addPermissionToRole('Anonymous', p) |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
138 |
|
928
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
139 # oh, g'wan, let anonymous access the web interface too |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
140 p = db.security.getPermission('Web Access') |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
141 db.security.addPermissionToRole('Anonymous', p) |
|
905
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
142 |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
143 import detectors |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
144 detectors.init(db) |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
145 |
|
825
0779ea9f1f18
More indexer work:
Richard Jones <richard@users.sourceforge.net>
parents:
748
diff
changeset
|
146 # schema is set up - run any post-initialisation |
|
0779ea9f1f18
More indexer work:
Richard Jones <richard@users.sourceforge.net>
parents:
748
diff
changeset
|
147 db.post_init() |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
148 return db |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
149 |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
150 def init(adminpw): |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
151 ''' as from the roundupdb method initDB |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
152 |
|
748
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
153 Open the new database, and add new nodes - used for initialisation. You |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
154 can edit this before running the "roundup-admin initialise" command to |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
155 change the initial database entries. |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
156 ''' |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
157 dbdir = os.path.join(instance_config.DATABASE, 'files') |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
158 if not os.path.isdir(dbdir): |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
159 os.makedirs(dbdir) |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
160 |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
161 db = open("admin") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
162 db.clear() |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
163 |
|
905
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
164 # |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
165 # INITIAL PRIORITY AND STATUS VALUES |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
166 # |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
167 pri = db.getclass('priority') |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
168 pri.create(name="critical", order="1") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
169 pri.create(name="urgent", order="2") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
170 pri.create(name="bug", order="3") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
171 pri.create(name="feature", order="4") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
172 pri.create(name="wish", order="5") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
173 |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
174 stat = db.getclass('status') |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
175 stat.create(name="unread", order="1") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
176 stat.create(name="deferred", order="2") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
177 stat.create(name="chatting", order="3") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
178 stat.create(name="need-eg", order="4") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
179 stat.create(name="in-progress", order="5") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
180 stat.create(name="testing", order="6") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
181 stat.create(name="done-cbb", order="7") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
182 stat.create(name="resolved", order="8") |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
183 |
|
905
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
184 # create the two default users |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
185 user = db.getclass('user') |
|
905
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
186 user.create(username="admin", password=adminpw, |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
187 address=instance_config.ADMIN_EMAIL, roles='Admin') |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
188 user.create(username="anonymous", roles='Anonymous') |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
189 |
|
430
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
190 db.commit() |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
191 |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
192 # |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
193 # $Log: not supported by cvs2svn $ |
|
1007
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
194 # Revision 1.24 2002/09/01 04:32:30 richard |
|
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
195 # . Lots of cleanup in the classic html (stylesheet, search page, index page, ...) |
|
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
196 # . Reinstated searching, but not query saving yet |
|
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
197 # . Filtering only allows sorting and grouping by one property - all backends |
|
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
198 # now implement this behaviour. |
|
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
199 # . Nosy list journalling turned off by default, everything else is on. |
|
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
200 # . Added some convenience methods (reverse, propchanged, [item] accesses, ...) |
|
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
201 # . Did I mention the stylesheet is much cleaner now? :) |
|
fec6af48558b
don't journal author and recipient link events by default
Richard Jones <richard@users.sourceforge.net>
parents:
1002
diff
changeset
|
202 # |
| 1002 | 203 # Revision 1.23 2002/08/30 08:30:45 richard |
| 204 # allow perms on user class | |
| 205 # | |
|
988
e02093543d59
allow perms on user class
Richard Jones <richard@users.sourceforge.net>
parents:
928
diff
changeset
|
206 # Revision 1.22 2002/08/01 00:56:22 richard |
|
e02093543d59
allow perms on user class
Richard Jones <richard@users.sourceforge.net>
parents:
928
diff
changeset
|
207 # Added the web access and email access permissions, so people can restrict |
|
e02093543d59
allow perms on user class
Richard Jones <richard@users.sourceforge.net>
parents:
928
diff
changeset
|
208 # access to users who register through the email interface (for example). |
|
e02093543d59
allow perms on user class
Richard Jones <richard@users.sourceforge.net>
parents:
928
diff
changeset
|
209 # Also added "security" command to the roundup-admin interface to display the |
|
e02093543d59
allow perms on user class
Richard Jones <richard@users.sourceforge.net>
parents:
928
diff
changeset
|
210 # Role/Permission config for an instance. |
|
e02093543d59
allow perms on user class
Richard Jones <richard@users.sourceforge.net>
parents:
928
diff
changeset
|
211 # |
|
928
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
212 # Revision 1.21 2002/07/26 08:26:59 richard |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
213 # Very close now. The cgi and mailgw now use the new security API. The two |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
214 # templates have been migrated to that setup. Lots of unit tests. Still some |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
215 # issue in the web form for editing Roles assigned to users. |
|
23c9d4f86380
Added the web access and email access permissions..
Richard Jones <richard@users.sourceforge.net>
parents:
905
diff
changeset
|
216 # |
|
905
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
217 # Revision 1.20 2002/07/17 12:39:10 gmcm |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
218 # Saving, running & editing queries. |
|
502a5ae11cc5
Very close now. The cgi and mailgw now use the new security API.
Richard Jones <richard@users.sourceforge.net>
parents:
872
diff
changeset
|
219 # |
|
872
bd6211d39328
Saving, running & editing queries.
Gordon B. McMillan <gmcm@users.sourceforge.net>
parents:
858
diff
changeset
|
220 # Revision 1.19 2002/07/14 02:05:54 richard |
|
bd6211d39328
Saving, running & editing queries.
Gordon B. McMillan <gmcm@users.sourceforge.net>
parents:
858
diff
changeset
|
221 # . all storage-specific code (ie. backend) is now implemented by the backends |
|
bd6211d39328
Saving, running & editing queries.
Gordon B. McMillan <gmcm@users.sourceforge.net>
parents:
858
diff
changeset
|
222 # |
|
858
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
223 # Revision 1.18 2002/07/09 03:02:53 richard |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
224 # More indexer work: |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
225 # - all String properties may now be indexed too. Currently there's a bit of |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
226 # "issue" specific code in the actual searching which needs to be |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
227 # addressed. In a nutshell: |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
228 # + pass 'indexme="yes"' as a String() property initialisation arg, eg: |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
229 # file = FileClass(db, "file", name=String(), type=String(), |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
230 # comment=String(indexme="yes")) |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
231 # + the comment will then be indexed and be searchable, with the results |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
232 # related back to the issue that the file is linked to |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
233 # - as a result of this work, the FileClass has a default MIME type that may |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
234 # be overridden in a subclass, or by the use of a "type" property as is |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
235 # done in the default templates. |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
236 # - the regeneration of the indexes (if necessary) is done once the schema is |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
237 # set up in the dbinit. |
|
2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
Richard Jones <richard@users.sourceforge.net>
parents:
825
diff
changeset
|
238 # |
|
825
0779ea9f1f18
More indexer work:
Richard Jones <richard@users.sourceforge.net>
parents:
748
diff
changeset
|
239 # Revision 1.17 2002/05/24 04:03:23 richard |
|
0779ea9f1f18
More indexer work:
Richard Jones <richard@users.sourceforge.net>
parents:
748
diff
changeset
|
240 # Added commentage to the dbinit files to help people with their |
|
0779ea9f1f18
More indexer work:
Richard Jones <richard@users.sourceforge.net>
parents:
748
diff
changeset
|
241 # customisation. |
|
0779ea9f1f18
More indexer work:
Richard Jones <richard@users.sourceforge.net>
parents:
748
diff
changeset
|
242 # |
|
748
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
243 # Revision 1.16 2002/02/16 08:06:14 richard |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
244 # Removed the key property restriction on title of the classic issue class. |
|
2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
Richard Jones <richard@users.sourceforge.net>
parents:
619
diff
changeset
|
245 # |
|
619
bb52c1419b4c
Removed the key property restriction on title of the classic issue class.
Richard Jones <richard@users.sourceforge.net>
parents:
617
diff
changeset
|
246 # Revision 1.15 2002/02/15 07:08:44 richard |
|
bb52c1419b4c
Removed the key property restriction on title of the classic issue class.
Richard Jones <richard@users.sourceforge.net>
parents:
617
diff
changeset
|
247 # . Alternate email addresses are now available for users. See the MIGRATION |
|
bb52c1419b4c
Removed the key property restriction on title of the classic issue class.
Richard Jones <richard@users.sourceforge.net>
parents:
617
diff
changeset
|
248 # file for info on how to activate the feature. |
|
bb52c1419b4c
Removed the key property restriction on title of the classic issue class.
Richard Jones <richard@users.sourceforge.net>
parents:
617
diff
changeset
|
249 # |
|
617
edd210915e64
Alternate email addresses are now available for users.
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
250 # Revision 1.14 2002/01/14 02:20:15 richard |
|
edd210915e64
Alternate email addresses are now available for users.
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
251 # . changed all config accesses so they access either the instance or the |
|
edd210915e64
Alternate email addresses are now available for users.
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
252 # config attriubute on the db. This means that all config is obtained from |
|
edd210915e64
Alternate email addresses are now available for users.
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
253 # instance_config instead of the mish-mash of classes. This will make |
|
edd210915e64
Alternate email addresses are now available for users.
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
254 # switching to a ConfigParser setup easier too, I hope. |
|
edd210915e64
Alternate email addresses are now available for users.
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
255 # |
|
edd210915e64
Alternate email addresses are now available for users.
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
256 # At a minimum, this makes migration a _little_ easier (a lot easier in the |
|
edd210915e64
Alternate email addresses are now available for users.
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
257 # 0.5.0 switch, I hope!) |
|
edd210915e64
Alternate email addresses are now available for users.
Richard Jones <richard@users.sourceforge.net>
parents:
524
diff
changeset
|
258 # |
|
524
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
259 # Revision 1.13 2002/01/02 02:31:38 richard |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
260 # Sorry for the huge checkin message - I was only intending to implement #496356 |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
261 # but I found a number of places where things had been broken by transactions: |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
262 # . modified ROUNDUPDBSENDMAILDEBUG to be SENDMAILDEBUG and hold a filename |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
263 # for _all_ roundup-generated smtp messages to be sent to. |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
264 # . the transaction cache had broken the roundupdb.Class set() reactors |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
265 # . newly-created author users in the mailgw weren't being committed to the db |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
266 # |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
267 # Stuff that made it into CHANGES.txt (ie. the stuff I was actually working |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
268 # on when I found that stuff :): |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
269 # . #496356 ] Use threading in messages |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
270 # . detectors were being registered multiple times |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
271 # . added tests for mailgw |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
272 # . much better attaching of erroneous messages in the mail gateway |
|
dce4c75bef5a
changed all config accesses...
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
273 # |
|
475
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
274 # Revision 1.12 2001/12/02 05:06:16 richard |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
275 # . We now use weakrefs in the Classes to keep the database reference, so |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
276 # the close() method on the database is no longer needed. |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
277 # I bumped the minimum python requirement up to 2.1 accordingly. |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
278 # . #487480 ] roundup-server |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
279 # . #487476 ] INSTALL.txt |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
280 # |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
281 # I also cleaned up the change message / post-edit stuff in the cgi client. |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
282 # There's now a clearly marked "TODO: append the change note" where I believe |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
283 # the change note should be added there. The "changes" list will obviously |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
284 # have to be modified to be a dict of the changes, or somesuch. |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
285 # |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
286 # More testing needed. |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
431
diff
changeset
|
287 # |
|
431
a28a80b714f9
Eliminate database close method by using weakrefs.
Richard Jones <richard@users.sourceforge.net>
parents:
430
diff
changeset
|
288 # Revision 1.11 2001/12/01 07:17:50 richard |
|
a28a80b714f9
Eliminate database close method by using weakrefs.
Richard Jones <richard@users.sourceforge.net>
parents:
430
diff
changeset
|
289 # . We now have basic transaction support! Information is only written to |
|
a28a80b714f9
Eliminate database close method by using weakrefs.
Richard Jones <richard@users.sourceforge.net>
parents:
430
diff
changeset
|
290 # the database when the commit() method is called. Only the anydbm |
|
a28a80b714f9
Eliminate database close method by using weakrefs.
Richard Jones <richard@users.sourceforge.net>
parents:
430
diff
changeset
|
291 # backend is modified in this way - neither of the bsddb backends have been. |
|
a28a80b714f9
Eliminate database close method by using weakrefs.
Richard Jones <richard@users.sourceforge.net>
parents:
430
diff
changeset
|
292 # The mail, admin and cgi interfaces all use commit (except the admin tool |
|
a28a80b714f9
Eliminate database close method by using weakrefs.
Richard Jones <richard@users.sourceforge.net>
parents:
430
diff
changeset
|
293 # doesn't have a commit command, so interactive users can't commit...) |
|
a28a80b714f9
Eliminate database close method by using weakrefs.
Richard Jones <richard@users.sourceforge.net>
parents:
430
diff
changeset
|
294 # . Fixed login/registration forwarding the user to the right page (or not, |
|
a28a80b714f9
Eliminate database close method by using weakrefs.
Richard Jones <richard@users.sourceforge.net>
parents:
430
diff
changeset
|
295 # on a failure) |
|
a28a80b714f9
Eliminate database close method by using weakrefs.
Richard Jones <richard@users.sourceforge.net>
parents:
430
diff
changeset
|
296 # |
|
430
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
297 # Revision 1.10 2001/11/26 22:55:56 richard |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
298 # Feature: |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
299 # . Added INSTANCE_NAME to configuration - used in web and email to identify |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
300 # the instance. |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
301 # . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
302 # signature info in e-mails. |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
303 # . Some more flexibility in the mail gateway and more error handling. |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
304 # . Login now takes you to the page you back to the were denied access to. |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
305 # |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
306 # Fixed: |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
307 # . Lots of bugs, thanks Roché and others on the devel mailing list! |
|
350685601f37
Database transactions.
Richard Jones <richard@users.sourceforge.net>
parents:
411
diff
changeset
|
308 # |
|
411
a6088556e9ba
Features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents:
337
diff
changeset
|
309 # Revision 1.9 2001/10/30 00:54:45 richard |
|
a6088556e9ba
Features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents:
337
diff
changeset
|
310 # Features: |
|
a6088556e9ba
Features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents:
337
diff
changeset
|
311 # . #467129 ] Lossage when username=e-mail-address |
|
a6088556e9ba
Features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents:
337
diff
changeset
|
312 # . #473123 ] Change message generation for author |
|
a6088556e9ba
Features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents:
337
diff
changeset
|
313 # . MailGW now moves 'resolved' to 'chatting' on receiving e-mail for an issue. |
|
a6088556e9ba
Features and fixes.
Richard Jones <richard@users.sourceforge.net>
parents:
337
diff
changeset
|
314 # |
| 337 | 315 # Revision 1.8 2001/10/09 07:25:59 richard |
| 316 # Added the Password property type. See "pydoc roundup.password" for | |
| 317 # implementation details. Have updated some of the documentation too. | |
| 318 # | |
|
270
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
319 # Revision 1.7 2001/08/07 00:24:43 richard |
|
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
320 # stupid typo |
|
a4241ddd22d7
Added the Password property type.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
321 # |
| 214 | 322 # Revision 1.6 2001/08/07 00:15:51 richard |
| 323 # Added the copyright/license notice to (nearly) all files at request of | |
| 324 # Bizar Software. | |
| 325 # | |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
326 # Revision 1.5 2001/08/02 06:38:17 richard |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
327 # Roundupdb now appends "mailing list" information to its messages which |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
328 # include the e-mail address and web interface address. Templates may |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
329 # override this in their db classes to include specific information (support |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
330 # instructions, etc). |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
188
diff
changeset
|
331 # |
|
188
1536be43d2fa
Roundupdb now appends "mailing list" information to its messages...
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
332 # Revision 1.4 2001/07/29 07:01:39 richard |
|
1536be43d2fa
Roundupdb now appends "mailing list" information to its messages...
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
333 # Added vim command to all source so that we don't get no steenkin' tabs :) |
|
1536be43d2fa
Roundupdb now appends "mailing list" information to its messages...
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
334 # |
|
127
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
335 # Revision 1.3 2001/07/24 10:46:22 anthonybaxter |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
336 # Added templatebuilder module. two functions - one to pack up the html base, |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
337 # one to unpack it. Packed up the two standard templates into htmlbases. |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
338 # Modified __init__ to install them. |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
339 # |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
340 # __init__.py magic was needed for the rather high levels of wierd import magic. |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
341 # Reducing level of import magic == (good, future) |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
342 # |
|
68
5e71aaa87e5b
Added templatebuilder module.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
60
diff
changeset
|
343 # Revision 1.2 2001/07/24 01:06:43 richard |
|
5e71aaa87e5b
Added templatebuilder module.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
60
diff
changeset
|
344 # Oops - accidentally duped the keywords class |
|
5e71aaa87e5b
Added templatebuilder module.
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
60
diff
changeset
|
345 # |
|
60
e9735680d5b3
Oops - accidentally duped the keywords class
Richard Jones <richard@users.sourceforge.net>
parents:
57
diff
changeset
|
346 # Revision 1.1 2001/07/23 23:28:43 richard |
|
e9735680d5b3
Oops - accidentally duped the keywords class
Richard Jones <richard@users.sourceforge.net>
parents:
57
diff
changeset
|
347 # Adding the classic template |
|
e9735680d5b3
Oops - accidentally duped the keywords class
Richard Jones <richard@users.sourceforge.net>
parents:
57
diff
changeset
|
348 # |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
349 # Revision 1.4 2001/07/23 08:45:28 richard |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
350 # ok, so now "./roundup-admin init" will ask questions in an attempt to get a |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
351 # workable instance_home set up :) |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
352 # _and_ anydbm has had its first test :) |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
353 # |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
354 # Revision 1.3 2001/07/23 07:14:41 richard |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
355 # Moved the database backends off into backends. |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
356 # |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
357 # Revision 1.2 2001/07/23 06:25:50 richard |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
358 # relfected the move to roundup/backends |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
359 # |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
360 # Revision 1.1 2001/07/23 04:33:21 anthonybaxter |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
361 # split __init__.py into 2. dbinit and instance_config. |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
362 # |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
363 # Revision 1.1 2001/07/23 03:50:46 anthonybaxter |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
364 # moved templates to proper location |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
365 # |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
366 # Revision 1.2 2001/07/22 12:09:32 richard |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
367 # Final commit of Grande Splite |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
368 # |
|
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
369 # |
|
127
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
68
diff
changeset
|
370 # vim: set filetype=python ts=4 sw=4 et si |
|
57
6ff85bc2dd56
Adding the classic template
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
371 |
