diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-01-07 16:34:13 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-01-07 16:34:13 -0500 |
commit | c487b847e2053b13c4eea0ccfeecf5a41c396412 (patch) | |
tree | c58c8a1dcc3372907fdc2e2940dcc3cc5faf4adf /doc/plugins | |
parent | 45de8dc710bf5844ed99514342bade439c396084 (diff) |
* Improved the canedit hook interface, allowing a callback function to be
returned (and not run in some cases) rather than the plugins directly
forcing a user to log in.
* opendiscussion: allow editing of the toplevel discussion page,
and, indirectly, allow creating new discussion pages.
Diffstat (limited to 'doc/plugins')
-rw-r--r-- | doc/plugins/write.mdwn | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 4ff5ff59e..34caf83f6 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -246,10 +246,16 @@ a page can be edited using the web interface (commits from revision control bypass it). When a page is edited, each registered canedit hook is called in turn, and passed the page name, a CGI object, and a session object. -If edit can proceed, the hook should return "". If the edit is not allowed -by this hook, the hook should return an error message for the user to see. If the hook has no opinion about whether the edit can proceed, return -`undef`, and the next plugin will be asked to decide. +`undef`, and the next plugin will be asked to decide. If edit can proceed, +the hook should return "". If the edit is not allowed by this hook, the +hook should return an error message for the user to see, or a function +that can be run to log the user in or perform other action necessary for +them to be able to edit the page. + +This hook should avoid directly redirecting the user to a signin page, +since it's sometimes used to test to see which pages in a set of pages a +user can edit. ### editcontent |