|
2 | 2 | Customising Roundup |
3 | 3 | =================== |
4 | 4 |
|
5 | | -:Version: $Revision: 1.17 $ |
| 5 | +:Version: $Revision: 1.18 $ |
6 | 6 |
|
7 | 7 | .. contents:: |
8 | 8 |
|
@@ -675,6 +675,86 @@ which defaults to: |
675 | 675 | - only classname suplied: "index" |
676 | 676 | - full item designator supplied: "item" |
677 | 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. |
| 757 | + |
678 | 758 |
|
679 | 759 | Repurcussions of changing the instance schema |
680 | 760 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
0 commit comments