Skip to content

Commit d85bcf6

Browse files
author
Richard Jones
committed
Added configuration for:
. anonymous user access and registration (deny/allow) . filter "widget" location on index page (top, bottom, both) Updated some documentation.
1 parent ab71c16 commit d85bcf6

File tree

11 files changed

+87
-15
lines changed

11 files changed

+87
-15
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4-
2001-10-?? - 0.3.0
4+
2001-10-22 - 0.3.0 pre 3
55
Feature:
66
. MailGW now moves 'unread' to 'chatting' on receiving e-mail for an issue.
77
. feature #473127: Filenames. I modified the file.index and htmltemplate

doc/announcement.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ we're releasing this preview for the bleeding-edge users.
99
**NOTE** existing users _must_ read the MIGRATION.txt that accompanies the
1010
source.
1111

12-
This release fixes a nasty bug in the hyperdatabase that was inserted in
13-
pre-release 1. Users who downloaded that release MUST download this release.
12+
This release contains a bunch of changes and bug fixes. See the CHANGES
13+
file for details.
1414

1515
Source and documentation is available at the website:
1616
http://roundup.sourceforge.net/

doc/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ <h3>Users and permissions</h3>
260260
automatically logged in as that user. This gives them write access.
261261
</dl>
262262
<p>
263+
*** anonymous access and the ANONYMOUS_* configuratins.
263264

264265
<h3>Adding users</h3>
265266
To add users, use one of the following interfaces:
@@ -1157,7 +1158,7 @@ <h1><a name="ack">Acknowledgements</a></h1>
11571158

11581159
<p>&nbsp;</p>
11591160
<hr>
1160-
$Id: index.html,v 1.15 2001-10-21 11:39:49 richard Exp $
1161+
$Id: index.html,v 1.16 2001-10-22 03:25:01 richard Exp $
11611162
<p>&nbsp;</p>
11621163

11631164
</body></html>

roundup/cgi_client.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: cgi_client.py,v 1.37 2001-10-21 07:26:35 richard Exp $
18+
# $Id: cgi_client.py,v 1.38 2001-10-22 03:25:01 richard Exp $
1919

2020
import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes
2121
import base64, Cookie, time
@@ -39,7 +39,18 @@ class Client:
3939
'anonymous' user exists, the user is logged in using that user (though
4040
there is no cookie). This allows them to modify the database, and all
4141
modifications are attributed to the 'anonymous' user.
42+
43+
44+
Customisation
45+
-------------
46+
FILTER_POSITION - one of 'top', 'bottom', 'top and bottom'
47+
ANONYMOUS_ACCESS - one of 'deny', 'allow'
48+
ANONYMOUS_REGISTER - one of 'deny', 'allow'
49+
4250
'''
51+
FILTER_POSITION = 'bottom' # one of 'top', 'bottom', 'top and bottom'
52+
ANONYMOUS_ACCESS = 'deny' # one of 'deny', 'allow'
53+
ANONYMOUS_REGISTER = 'deny' # one of 'deny', 'allow'
4354

4455
def __init__(self, instance, out, env):
4556
self.instance = instance
@@ -493,7 +504,11 @@ def login(self, message=None):
493504
<tr><td></td>
494505
<td><input type="submit" value="Log In"></td></tr>
495506
</form>
496-
507+
''')
508+
if self.user is None and not self.ANONYMOUS_REGISTER == 'deny':
509+
self.write('</table')
510+
return
511+
self.write('''
497512
<p>
498513
<tr><td colspan=2 class="strong-header">New User Registration</td></tr>
499514
<tr><td colspan=2><em>marked items</em> are optional...</td></tr>
@@ -611,6 +626,10 @@ def main(self, dre=re.compile(r'([^\d]+)(\d+)'),
611626
self.user = user
612627
self.db.close()
613628

629+
# make sure totally anonymous access is OK
630+
if self.ANONYMOUS_ACCESS == 'deny' and self.user is None:
631+
return self.login()
632+
614633
# re-open the database for real, using the user
615634
self.db = self.instance.open(self.user)
616635

@@ -815,6 +834,11 @@ def parsePropsFromForm(db, cl, form, nodeid=0):
815834

816835
#
817836
# $Log: not supported by cvs2svn $
837+
# Revision 1.37 2001/10/21 07:26:35 richard
838+
# feature #473127: Filenames. I modified the file.index and htmltemplate
839+
# source so that the filename is used in the link and the creation
840+
# information is displayed.
841+
#
818842
# Revision 1.36 2001/10/21 04:44:50 richard
819843
# bug #473124: UI inconsistency with Link fields.
820844
# This also prompted me to fix a fairly long-standing usability issue -

roundup/htmltemplate.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: htmltemplate.py,v 1.31 2001-10-21 07:26:35 richard Exp $
18+
# $Id: htmltemplate.py,v 1.32 2001-10-22 03:25:01 richard Exp $
1919

2020
import os, re, StringIO, urllib, cgi, errno
2121

@@ -566,8 +566,9 @@ def index(client, templates, db, classname, filterspec={}, filter=[],
566566
columns = l
567567

568568
# display the filter section
569-
filter_section(w, cl, filter, columns, group, all_filters, all_columns,
570-
show_display_form, show_customization)
569+
if hasattr(client, 'FILTER_POSITION') and client.FILTER_POSITION in ('top and bottom', 'top'):
570+
filter_section(w, cl, filter, columns, group, all_filters, all_columns,
571+
show_display_form, show_customization)
571572

572573
# now display the index section
573574
w('<table width=100% border=0 cellspacing=0 cellpadding=2>\n')
@@ -637,6 +638,11 @@ def index(client, templates, db, classname, filterspec={}, filter=[],
637638

638639
w('</table>')
639640

641+
# display the filter section
642+
if hasattr(client, 'FILTER_POSITION') and client.FILTER_POSITION in ('top and bottom', 'bottom'):
643+
filter_section(w, cl, filter, columns, group, all_filters, all_columns,
644+
show_display_form, show_customization)
645+
640646

641647
def filter_section(w, cl, filter, columns, group, all_filters, all_columns,
642648
show_display_form, show_customization):
@@ -833,6 +839,11 @@ def newitem(client, templates, db, classname, form, replace=re.compile(
833839

834840
#
835841
# $Log: not supported by cvs2svn $
842+
# Revision 1.31 2001/10/21 07:26:35 richard
843+
# feature #473127: Filenames. I modified the file.index and htmltemplate
844+
# source so that the filename is used in the link and the creation
845+
# information is displayed.
846+
#
836847
# Revision 1.30 2001/10/21 04:44:50 richard
837848
# bug #473124: UI inconsistency with Link fields.
838849
# This also prompted me to fix a fairly long-standing usability issue -

roundup/templates/classic/htmlbase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Do Not Edit (Unless You Want To)
33
# This file automagically generated by roundup.htmldata.makeHtmlBase
44
#
5-
fileDOTindex = """<!-- dollarId: file.index,v 1.2 2001/07/29 04:07:37 richard Exp dollar-->
5+
fileDOTindex = """<!-- dollarId: file.index,v 1.3 2001/10/21 11:42:15 richard Exp dollar-->
66
<tr>
77
<property name="name">
88
<td><display call="link('name', is_download=1)"></td>

roundup/templates/classic/instance_config.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: instance_config.py,v 1.6 2001-10-01 06:10:42 richard Exp $
18+
# $Id: instance_config.py,v 1.7 2001-10-22 03:25:01 richard Exp $
1919

2020
MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
2121
HTTP_PORT=0
@@ -62,8 +62,18 @@
6262
# Somewhere for roundup to log stuff internally sent to stdout or stderr
6363
LOG = os.path.join(INSTANCE_HOME, 'roundup.log')
6464

65+
# Deny or allow anonymous access to the web interface
66+
ANONYMOUS_ACCESS = 'deny'
67+
68+
# Deny or allow anonymous users to register through the web interface
69+
ANONYMOUS_REGISTER = 'deny'
70+
6571
#
6672
# $Log: not supported by cvs2svn $
73+
# Revision 1.6 2001/10/01 06:10:42 richard
74+
# stop people setting up roundup with our addresses as default - need to
75+
# handle this better in the init
76+
#
6777
# Revision 1.5 2001/08/07 00:24:43 richard
6878
# stupid typo
6979
#

roundup/templates/classic/interfaces.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: interfaces.py,v 1.7 2001-10-09 07:38:58 richard Exp $
18+
# $Id: interfaces.py,v 1.8 2001-10-22 03:25:01 richard Exp $
1919

2020
import instance_config
2121
from roundup import cgi_client, mailgw
@@ -25,6 +25,9 @@ class Client(cgi_client.Client):
2525
with any specific extensions
2626
'''
2727
TEMPLATES = instance_config.TEMPLATES
28+
FILTER_POSITION = instance_config.FILTER_POSITION
29+
ANONYMOUS_ACCESS = instance_config.ANONYMOUS_ACCESS
30+
ANONYMOUS_REGISTER = instance_config.ANONYMOUS_REGISTER
2831

2932
class MailGW(mailgw.MailGW):
3033
''' derives basic mail gateway implementation from the standard module,
@@ -36,6 +39,11 @@ class MailGW(mailgw.MailGW):
3639

3740
#
3841
# $Log: not supported by cvs2svn $
42+
# Revision 1.7 2001/10/09 07:38:58 richard
43+
# Pushed the base code for the extended schema CGI interface back into the
44+
# code cgi_client module so that future updates will be less painful.
45+
# Also removed a debugging print statement from cgi_client.
46+
#
3947
# Revision 1.6 2001/08/07 00:24:43 richard
4048
# stupid typo
4149
#

roundup/templates/extended/htmlbase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Do Not Edit (Unless You Want To)
33
# This file automagically generated by roundup.htmldata.makeHtmlBase
44
#
5-
fileDOTindex = """<!-- dollarId: file.index,v 1.1 2001/07/23 04:21:20 richard Exp dollar-->
5+
fileDOTindex = """<!-- dollarId: file.index,v 1.2 2001/10/21 11:42:15 richard Exp dollar-->
66
<tr>
77
<property name="name">
88
<td><display call="link('name', is_download=1)"></td>

roundup/templates/extended/instance_config.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: instance_config.py,v 1.6 2001-10-01 06:10:42 richard Exp $
18+
# $Id: instance_config.py,v 1.7 2001-10-22 03:25:01 richard Exp $
1919

2020
MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
2121
HTTP_PORT=0
@@ -62,8 +62,18 @@
6262
# Somewhere for roundup to log stuff internally sent to stdout or stderr
6363
LOG = os.path.join(INSTANCE_HOME, 'roundup.log')
6464

65+
# Deny or allow anonymous access to the web interface
66+
ANONYMOUS_ACCESS = 'deny'
67+
68+
# Deny or allow anonymous users to register through the web interface
69+
ANONYMOUS_REGISTER = 'deny'
70+
6571
#
6672
# $Log: not supported by cvs2svn $
73+
# Revision 1.6 2001/10/01 06:10:42 richard
74+
# stop people setting up roundup with our addresses as default - need to
75+
# handle this better in the init
76+
#
6777
# Revision 1.5 2001/08/07 00:24:43 richard
6878
# stupid typo
6979
#

0 commit comments

Comments
 (0)