From 254d60c75a26b6b0cd0c3d7aeb9b9846c56152d9 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 22 Oct 2001 03:25:01 +0000 Subject: [PATCH] Added configuration for: . anonymous user access and registration (deny/allow) . filter "widget" location on index page (top, bottom, both) Updated some documentation. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@326 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 2 +- doc/announcement.txt | 4 +-- doc/index.html | 3 +- roundup/cgi_client.py | 28 +++++++++++++++++-- roundup/htmltemplate.py | 17 +++++++++-- roundup/templates/classic/htmlbase.py | 2 +- roundup/templates/classic/instance_config.py | 12 +++++++- roundup/templates/classic/interfaces.py | 10 ++++++- roundup/templates/extended/htmlbase.py | 2 +- roundup/templates/extended/instance_config.py | 12 +++++++- roundup/templates/extended/interfaces.py | 10 ++++++- 11 files changed, 87 insertions(+), 15 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6215187..879c638 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,7 @@ This file contains the changes to the Roundup system over time. The entries are given with the most recent entry first. -2001-10-?? - 0.3.0 +2001-10-22 - 0.3.0 pre 3 Feature: . MailGW now moves 'unread' to 'chatting' on receiving e-mail for an issue. . feature #473127: Filenames. I modified the file.index and htmltemplate diff --git a/doc/announcement.txt b/doc/announcement.txt index 9efe642..0ce13e8 100644 --- a/doc/announcement.txt +++ b/doc/announcement.txt @@ -9,8 +9,8 @@ we're releasing this preview for the bleeding-edge users. **NOTE** existing users _must_ read the MIGRATION.txt that accompanies the source. -This release fixes a nasty bug in the hyperdatabase that was inserted in -pre-release 1. Users who downloaded that release MUST download this release. +This release contains a bunch of changes and bug fixes. See the CHANGES +file for details. Source and documentation is available at the website: http://roundup.sourceforge.net/ diff --git a/doc/index.html b/doc/index.html index ee5865a..1707bfe 100644 --- a/doc/index.html +++ b/doc/index.html @@ -260,6 +260,7 @@ entry with the username "anonymous", then unidentified users are automatically logged in as that user. This gives them write access.

+*** anonymous access and the ANONYMOUS_* configuratins.

Adding users

To add users, use one of the following interfaces: @@ -1157,7 +1158,7 @@ system on their time.

 


-$Id: index.html,v 1.15 2001-10-21 11:39:49 richard Exp $ +$Id: index.html,v 1.16 2001-10-22 03:25:01 richard Exp $

 

diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py index 3f7b4cc..88fc686 100644 --- a/roundup/cgi_client.py +++ b/roundup/cgi_client.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: cgi_client.py,v 1.37 2001-10-21 07:26:35 richard Exp $ +# $Id: cgi_client.py,v 1.38 2001-10-22 03:25:01 richard Exp $ import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes import base64, Cookie, time @@ -39,7 +39,18 @@ class Client: 'anonymous' user exists, the user is logged in using that user (though there is no cookie). This allows them to modify the database, and all modifications are attributed to the 'anonymous' user. + + + Customisation + ------------- + FILTER_POSITION - one of 'top', 'bottom', 'top and bottom' + ANONYMOUS_ACCESS - one of 'deny', 'allow' + ANONYMOUS_REGISTER - one of 'deny', 'allow' + ''' + FILTER_POSITION = 'bottom' # one of 'top', 'bottom', 'top and bottom' + ANONYMOUS_ACCESS = 'deny' # one of 'deny', 'allow' + ANONYMOUS_REGISTER = 'deny' # one of 'deny', 'allow' def __init__(self, instance, out, env): self.instance = instance @@ -493,7 +504,11 @@ class Client: - +''') + if self.user is None and not self.ANONYMOUS_REGISTER == 'deny': + self.write(' New User Registration marked items are optional... @@ -611,6 +626,10 @@ class Client: self.user = user self.db.close() + # make sure totally anonymous access is OK + if self.ANONYMOUS_ACCESS == 'deny' and self.user is None: + return self.login() + # re-open the database for real, using the user self.db = self.instance.open(self.user) @@ -815,6 +834,11 @@ def parsePropsFromForm(db, cl, form, nodeid=0): # # $Log: not supported by cvs2svn $ +# Revision 1.37 2001/10/21 07:26:35 richard +# feature #473127: Filenames. I modified the file.index and htmltemplate +# source so that the filename is used in the link and the creation +# information is displayed. +# # Revision 1.36 2001/10/21 04:44:50 richard # bug #473124: UI inconsistency with Link fields. # This also prompted me to fix a fairly long-standing usability issue - diff --git a/roundup/htmltemplate.py b/roundup/htmltemplate.py index 8d73e48..0a78595 100644 --- a/roundup/htmltemplate.py +++ b/roundup/htmltemplate.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: htmltemplate.py,v 1.31 2001-10-21 07:26:35 richard Exp $ +# $Id: htmltemplate.py,v 1.32 2001-10-22 03:25:01 richard Exp $ import os, re, StringIO, urllib, cgi, errno @@ -566,8 +566,9 @@ def index(client, templates, db, classname, filterspec={}, filter=[], columns = l # display the filter section - filter_section(w, cl, filter, columns, group, all_filters, all_columns, - show_display_form, show_customization) + if hasattr(client, 'FILTER_POSITION') and client.FILTER_POSITION in ('top and bottom', 'top'): + filter_section(w, cl, filter, columns, group, all_filters, all_columns, + show_display_form, show_customization) # now display the index section w('\n') @@ -637,6 +638,11 @@ def index(client, templates, db, classname, filterspec={}, filter=[], w('
') + # display the filter section + if hasattr(client, 'FILTER_POSITION') and client.FILTER_POSITION in ('top and bottom', 'bottom'): + filter_section(w, cl, filter, columns, group, all_filters, all_columns, + show_display_form, show_customization) + def filter_section(w, cl, filter, columns, group, all_filters, all_columns, show_display_form, show_customization): @@ -833,6 +839,11 @@ def newitem(client, templates, db, classname, form, replace=re.compile( # # $Log: not supported by cvs2svn $ +# Revision 1.31 2001/10/21 07:26:35 richard +# feature #473127: Filenames. I modified the file.index and htmltemplate +# source so that the filename is used in the link and the creation +# information is displayed. +# # Revision 1.30 2001/10/21 04:44:50 richard # bug #473124: UI inconsistency with Link fields. # This also prompted me to fix a fairly long-standing usability issue - diff --git a/roundup/templates/classic/htmlbase.py b/roundup/templates/classic/htmlbase.py index 23f0103..45ba1ac 100644 --- a/roundup/templates/classic/htmlbase.py +++ b/roundup/templates/classic/htmlbase.py @@ -2,7 +2,7 @@ # Do Not Edit (Unless You Want To) # This file automagically generated by roundup.htmldata.makeHtmlBase # -fileDOTindex = """ +fileDOTindex = """ diff --git a/roundup/templates/classic/instance_config.py b/roundup/templates/classic/instance_config.py index 55c43a6..176a981 100644 --- a/roundup/templates/classic/instance_config.py +++ b/roundup/templates/classic/instance_config.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: instance_config.py,v 1.6 2001-10-01 06:10:42 richard Exp $ +# $Id: instance_config.py,v 1.7 2001-10-22 03:25:01 richard Exp $ MAIL_DOMAIN=MAILHOST=HTTP_HOST=None HTTP_PORT=0 @@ -62,8 +62,18 @@ ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN # Somewhere for roundup to log stuff internally sent to stdout or stderr LOG = os.path.join(INSTANCE_HOME, 'roundup.log') +# Deny or allow anonymous access to the web interface +ANONYMOUS_ACCESS = 'deny' + +# Deny or allow anonymous users to register through the web interface +ANONYMOUS_REGISTER = 'deny' + # # $Log: not supported by cvs2svn $ +# Revision 1.6 2001/10/01 06:10:42 richard +# stop people setting up roundup with our addresses as default - need to +# handle this better in the init +# # Revision 1.5 2001/08/07 00:24:43 richard # stupid typo # diff --git a/roundup/templates/classic/interfaces.py b/roundup/templates/classic/interfaces.py index 6046b8a..bd64559 100644 --- a/roundup/templates/classic/interfaces.py +++ b/roundup/templates/classic/interfaces.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: interfaces.py,v 1.7 2001-10-09 07:38:58 richard Exp $ +# $Id: interfaces.py,v 1.8 2001-10-22 03:25:01 richard Exp $ import instance_config from roundup import cgi_client, mailgw @@ -25,6 +25,9 @@ class Client(cgi_client.Client): with any specific extensions ''' TEMPLATES = instance_config.TEMPLATES + FILTER_POSITION = instance_config.FILTER_POSITION + ANONYMOUS_ACCESS = instance_config.ANONYMOUS_ACCESS + ANONYMOUS_REGISTER = instance_config.ANONYMOUS_REGISTER class MailGW(mailgw.MailGW): ''' derives basic mail gateway implementation from the standard module, @@ -36,6 +39,11 @@ class MailGW(mailgw.MailGW): # # $Log: not supported by cvs2svn $ +# Revision 1.7 2001/10/09 07:38:58 richard +# Pushed the base code for the extended schema CGI interface back into the +# code cgi_client module so that future updates will be less painful. +# Also removed a debugging print statement from cgi_client. +# # Revision 1.6 2001/08/07 00:24:43 richard # stupid typo # diff --git a/roundup/templates/extended/htmlbase.py b/roundup/templates/extended/htmlbase.py index f3e4386..ca32455 100644 --- a/roundup/templates/extended/htmlbase.py +++ b/roundup/templates/extended/htmlbase.py @@ -2,7 +2,7 @@ # Do Not Edit (Unless You Want To) # This file automagically generated by roundup.htmldata.makeHtmlBase # -fileDOTindex = """ +fileDOTindex = """ diff --git a/roundup/templates/extended/instance_config.py b/roundup/templates/extended/instance_config.py index acdb42a..643c409 100644 --- a/roundup/templates/extended/instance_config.py +++ b/roundup/templates/extended/instance_config.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: instance_config.py,v 1.6 2001-10-01 06:10:42 richard Exp $ +# $Id: instance_config.py,v 1.7 2001-10-22 03:25:01 richard Exp $ MAIL_DOMAIN=MAILHOST=HTTP_HOST=None HTTP_PORT=0 @@ -62,8 +62,18 @@ ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN # Somewhere for roundup to log stuff internally sent to stdout or stderr LOG = os.path.join(INSTANCE_HOME, 'roundup.log') +# Deny or allow anonymous access to the web interface +ANONYMOUS_ACCESS = 'deny' + +# Deny or allow anonymous users to register through the web interface +ANONYMOUS_REGISTER = 'deny' + # # $Log: not supported by cvs2svn $ +# Revision 1.6 2001/10/01 06:10:42 richard +# stop people setting up roundup with our addresses as default - need to +# handle this better in the init +# # Revision 1.5 2001/08/07 00:24:43 richard # stupid typo # diff --git a/roundup/templates/extended/interfaces.py b/roundup/templates/extended/interfaces.py index 14eba7a..3f2ac14 100644 --- a/roundup/templates/extended/interfaces.py +++ b/roundup/templates/extended/interfaces.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: interfaces.py,v 1.11 2001-10-09 07:38:58 richard Exp $ +# $Id: interfaces.py,v 1.12 2001-10-22 03:25:01 richard Exp $ import instance_config from roundup import cgi_client, mailgw @@ -25,6 +25,9 @@ class Client(cgi_client.ExtendedClient): with any specific extensions ''' TEMPLATES = instance_config.TEMPLATES + FILTER_POSITION = instance_config.FILTER_POSITION + ANONYMOUS_ACCESS = instance_config.ANONYMOUS_ACCESS + ANONYMOUS_REGISTER = instance_config.ANONYMOUS_REGISTER class MailGW(mailgw.MailGW): ''' derives basic mail gateway implementation from the standard module, @@ -36,6 +39,11 @@ class MailGW(mailgw.MailGW): # # $Log: not supported by cvs2svn $ +# Revision 1.11 2001/10/09 07:38:58 richard +# Pushed the base code for the extended schema CGI interface back into the +# code cgi_client module so that future updates will be less painful. +# Also removed a debugging print statement from cgi_client. +# # Revision 1.10 2001/10/05 02:23:24 richard # . roundup-admin create now prompts for property info if none is supplied # on the command-line. -- 2.30.2