summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d462034)
raw | patch | inline | side by side (parent: d462034)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 6 Sep 2002 03:21:30 +0000 (03:21 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 6 Sep 2002 03:21:30 +0000 (03:21 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1077 57a73879-2fb5-44c3-a270-3262357dd7e2
TODO.txt | patch | blob | history | |
doc/customizing.txt | patch | blob | history | |
roundup/cgi/client.py | patch | blob | history | |
roundup/templates/classic/html/user.item | patch | blob | history |
diff --git a/TODO.txt b/TODO.txt
index b7b3abb0ec6b90298264a61cd41a7a2b1d85eb7b..d4e9a20154604dd8f028436a5b03de8f26d5725b 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
query values
pending web: have roundup.cgi pick up instance config from the environment
pending web: UNIX init.d script for roundup-server
-pending web: rewritten documentation (can come after the beta though so stuff
- is settled)
pending web: modify cgitb to handle PageTemplate errors better (see how
Zope handles __traceback_supplement__ and __traceback_info__)
pending web: title is stoopid
+pending web: rewritten documentation (can come after the beta though so stuff
+ is settled) ... including relevant file names in customisation doc
bug: request.url is incorrect in cgi-bin environments
+
done web: Re-enable link backrefs from messages (feature request #568714) (RJ)
done web: have the page layout (header/footer) be templatable (RJ)
done web: fixing the templating so it works (RJ)
diff --git a/doc/customizing.txt b/doc/customizing.txt
index 256583b82ad62b5d254f96dcb09199fd503c5c71..cf75193aa7a3972492182ff40e64816a7ef3f6d4 100644 (file)
--- a/doc/customizing.txt
+++ b/doc/customizing.txt
Customising Roundup
===================
-:Version: $Revision: 1.17 $
+:Version: $Revision: 1.18 $
.. contents::
- only classname suplied: "index"
- full item designator supplied: "item"
+Actions are triggered by using a ``:action`` CGI variable, where the value is
+one of:
+
+login
+ Attempt to log a user in.
+logout
+ Log the user out - make them "anonymous".
+register
+ Attempt to create a new user based on the contents of the form and then log
+ them in.
+edit
+ Perform an edit of an item in the database. There are some special form
+ elements you may use:
+
+ :link=designator:property and :multilink=designator:property
+ The value specifies a node designator and the property on that
+ node to add _this_ node to as a link or multilink.
+ __note
+ Create a message and attach it to the current node's
+ "messages" property.
+ __file
+ Create a file and attach it to the current node's
+ "files" property. Attach the file to the message created from
+ the __note if it's supplied.
+ :required=property,property,...
+ The named properties are required to be filled in the form.
+
+new
+ Add a new item to the database. You may use the same special form elements
+ as in the "edit" action.
+
+editCSV
+ Performs an edit of all of a class' items in one go. See also the
+ *class*.csv templating method which generates the CSV data to be edited, and
+ the "_generic.index" template which uses both of these features.
+
+search
+ Mangle some of the form variables.
+
+ Set the form ":filter" variable based on the values of the
+ filter variables - if they're set to anything other than
+ "dontcare" then add them to :filter.
+
+ Also handle the ":queryname" variable and save off the query to
+ the user's query list.
+
+Each of the actions is implemented by a corresponding *name*Action method on
+the roundup.cgi.Client class, which also happens to be in your instance as
+interfaces.Client. So if you need to define new actions, you may add them
+there (see `definining new web actions`_).
+
+Each action also has a corresponding *name*Permission method which determines
+whether the action is permissible given the current user. The base permission
+checks are:
+
+login
+ XXX TODO
+logout
+ No permission checks are made.
+register
+ Determine whether the user has permission to register
+ Base behaviour is to check the user has "Web Registration".
+edit
+ Determine whether the user has permission to edit this item.
+ Base behaviour is to check the user can edit this class. If we're
+ editing the "user" class, users are allowed to edit their own
+ details. Unless it's the "roles" property, which requires the
+ special Permission "Web Roles".
+new
+ Determine whether the user has permission to create (edit) this item.
+ Base behaviour is to check the user can edit this class. No
+ additional property checks are made. Additionally, new user items
+ may be created if the user has the "Web Registration" Permission.
+editCSV
+ Determine whether the user has permission to edit this class.
+ Base behaviour is to check the user can edit this class.
+search
+ Determine whether the user has permission to search this class.
+ Base behaviour is to check the user can view this class.
+
Repurcussions of changing the instance schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index 9fc4371ae680c96aaea4f67a765aacaca80f24c4..bb41f2e20070820a7a1cd410fb3a045652a649bd 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.16 2002-09-05 23:48:55 richard Exp $
+# $Id: client.py,v 1.17 2002-09-06 03:21:30 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
self.error_message.append(_('Incorrect password'))
return
+ # XXX check for web access permission!!!!
+
# set the session cookie
self.set_cookie(self.user, password)
index dff2ee4f62a9749fb44647e08eee504c18ddcf7f..7e528b86bd22430702c8cf0043ea21f0c39eecba 100644 (file)
<tal:block tal:condition="editok">
<form method="POST" onSubmit="return submit_once()" enctype="multipart/form-data">
+<input type="hidden" name=":required" value="username,address">
+
<table class="form">
<tr>
<th>Name</th>