Mercurial > p > roundup > code
comparison doc/customizing.txt @ 1058:a55ef5a98fd3
more docco... and we need to check for web access Permission!
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 06 Sep 2002 03:21:30 +0000 |
| parents | 8b9feca82090 |
| children | af0abadfda3a |
comparison
equal
deleted
inserted
replaced
| 1057:8b9feca82090 | 1058:a55ef5a98fd3 |
|---|---|
| 1 =================== | 1 =================== |
| 2 Customising Roundup | 2 Customising Roundup |
| 3 =================== | 3 =================== |
| 4 | 4 |
| 5 :Version: $Revision: 1.17 $ | 5 :Version: $Revision: 1.18 $ |
| 6 | 6 |
| 7 .. contents:: | 7 .. contents:: |
| 8 | 8 |
| 9 | 9 |
| 10 What You Can Do | 10 What You Can Do |
| 672 The template used is specified by the ``:template`` CGI variable, | 672 The template used is specified by the ``:template`` CGI variable, |
| 673 which defaults to: | 673 which defaults to: |
| 674 | 674 |
| 675 - only classname suplied: "index" | 675 - only classname suplied: "index" |
| 676 - full item designator supplied: "item" | 676 - full item designator supplied: "item" |
| 677 | |
| 678 Actions are triggered by using a ``:action`` CGI variable, where the value is | |
| 679 one of: | |
| 680 | |
| 681 login | |
| 682 Attempt to log a user in. | |
| 683 logout | |
| 684 Log the user out - make them "anonymous". | |
| 685 register | |
| 686 Attempt to create a new user based on the contents of the form and then log | |
| 687 them in. | |
| 688 edit | |
| 689 Perform an edit of an item in the database. There are some special form | |
| 690 elements you may use: | |
| 691 | |
| 692 :link=designator:property and :multilink=designator:property | |
| 693 The value specifies a node designator and the property on that | |
| 694 node to add _this_ node to as a link or multilink. | |
| 695 __note | |
| 696 Create a message and attach it to the current node's | |
| 697 "messages" property. | |
| 698 __file | |
| 699 Create a file and attach it to the current node's | |
| 700 "files" property. Attach the file to the message created from | |
| 701 the __note if it's supplied. | |
| 702 :required=property,property,... | |
| 703 The named properties are required to be filled in the form. | |
| 704 | |
| 705 new | |
| 706 Add a new item to the database. You may use the same special form elements | |
| 707 as in the "edit" action. | |
| 708 | |
| 709 editCSV | |
| 710 Performs an edit of all of a class' items in one go. See also the | |
| 711 *class*.csv templating method which generates the CSV data to be edited, and | |
| 712 the "_generic.index" template which uses both of these features. | |
| 713 | |
| 714 search | |
| 715 Mangle some of the form variables. | |
| 716 | |
| 717 Set the form ":filter" variable based on the values of the | |
| 718 filter variables - if they're set to anything other than | |
| 719 "dontcare" then add them to :filter. | |
| 720 | |
| 721 Also handle the ":queryname" variable and save off the query to | |
| 722 the user's query list. | |
| 723 | |
| 724 Each of the actions is implemented by a corresponding *name*Action method on | |
| 725 the roundup.cgi.Client class, which also happens to be in your instance as | |
| 726 interfaces.Client. So if you need to define new actions, you may add them | |
| 727 there (see `definining new web actions`_). | |
| 728 | |
| 729 Each action also has a corresponding *name*Permission method which determines | |
| 730 whether the action is permissible given the current user. The base permission | |
| 731 checks are: | |
| 732 | |
| 733 login | |
| 734 XXX TODO | |
| 735 logout | |
| 736 No permission checks are made. | |
| 737 register | |
| 738 Determine whether the user has permission to register | |
| 739 Base behaviour is to check the user has "Web Registration". | |
| 740 edit | |
| 741 Determine whether the user has permission to edit this item. | |
| 742 Base behaviour is to check the user can edit this class. If we're | |
| 743 editing the "user" class, users are allowed to edit their own | |
| 744 details. Unless it's the "roles" property, which requires the | |
| 745 special Permission "Web Roles". | |
| 746 new | |
| 747 Determine whether the user has permission to create (edit) this item. | |
| 748 Base behaviour is to check the user can edit this class. No | |
| 749 additional property checks are made. Additionally, new user items | |
| 750 may be created if the user has the "Web Registration" Permission. | |
| 751 editCSV | |
| 752 Determine whether the user has permission to edit this class. | |
| 753 Base behaviour is to check the user can edit this class. | |
| 754 search | |
| 755 Determine whether the user has permission to search this class. | |
| 756 Base behaviour is to check the user can view this class. | |
| 677 | 757 |
| 678 | 758 |
| 679 Repurcussions of changing the instance schema | 759 Repurcussions of changing the instance schema |
| 680 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 760 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 681 | 761 |
