diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-02 02:33:03 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-02 02:33:03 +0000 |
commit | 5f162cfd344f6b75fa39a57be4b3d488cadd1535 (patch) | |
tree | 56528c6b3fad333fc32ee4a774a0130bbfaa6131 /doc/plugins | |
parent | 930ca4d85f90ddf83cfaab7061a9ac49ee04313a (diff) |
* Add canedit hook, allowing arbitrary controls over when a page can be
edited.
* Move code forcing signing before edit to a new "signinedit" plugin, and
code checking for locked pages into a new "lockedit" plugin. Both are
enabled by default.
* Remove the anonok config setting. This is now implemented by a new
"anonok" plugin. Anyone with a wiki allowing anonymous edits should
change their configs to enable this new plugin.
* Add an opendiscussion plugin that allows anonymous users to edit
discussion pages, on a wiki that is otherwise wouldn't allow it.
* Lots of CGI code reorg and cleanup.
Diffstat (limited to 'doc/plugins')
-rw-r--r-- | doc/plugins/anonok.mdwn | 5 | ||||
-rw-r--r-- | doc/plugins/lockedit.mdwn | 4 | ||||
-rw-r--r-- | doc/plugins/opendiscussion.mdwn | 5 | ||||
-rw-r--r-- | doc/plugins/signinedit.mdwn | 5 | ||||
-rw-r--r-- | doc/plugins/type/auth.mdwn | 2 | ||||
-rw-r--r-- | doc/plugins/write.mdwn | 14 |
6 files changed, 34 insertions, 1 deletions
diff --git a/doc/plugins/anonok.mdwn b/doc/plugins/anonok.mdwn new file mode 100644 index 000000000..ae1c87f43 --- /dev/null +++ b/doc/plugins/anonok.mdwn @@ -0,0 +1,5 @@ +[[template id=plugin name=anonok included=1 author="[[Joey]]"]] +[[tag type/auth]] + +By default, anonymous users cannot edit the wiki. This plugin allows +anonymous web users, who have not signed in, to edit any page in the wiki. diff --git a/doc/plugins/lockedit.mdwn b/doc/plugins/lockedit.mdwn new file mode 100644 index 000000000..be9ca841c --- /dev/null +++ b/doc/plugins/lockedit.mdwn @@ -0,0 +1,4 @@ +[[template id=plugin name=lockedit core=1 included=1 author="[[Joey]]"]] +[[tag type/auth]] + +This plugin enables [[page_locking]]. It is enabled by default. diff --git a/doc/plugins/opendiscussion.mdwn b/doc/plugins/opendiscussion.mdwn new file mode 100644 index 000000000..3257224dc --- /dev/null +++ b/doc/plugins/opendiscussion.mdwn @@ -0,0 +1,5 @@ +[[template id=plugin name=opendiscussion included=1 author="[[Joey]]"]] +[[tag type/auth]] + +This plugin allows editing of Discussion pages by anonymous users who have +not logged into the wiki. diff --git a/doc/plugins/signinedit.mdwn b/doc/plugins/signinedit.mdwn new file mode 100644 index 000000000..5beae9dab --- /dev/null +++ b/doc/plugins/signinedit.mdwn @@ -0,0 +1,5 @@ +[[template id=plugin name=signinedit core=1 included=1 author="[[Joey]]"]] +[[tag type/auth]] + +This plugin, which is enabled by default, requires users be logged in +before editing pages in the wiki. diff --git a/doc/plugins/type/auth.mdwn b/doc/plugins/type/auth.mdwn index a6ae5e4ea..400a5bcca 100644 --- a/doc/plugins/type/auth.mdwn +++ b/doc/plugins/type/auth.mdwn @@ -1,2 +1,2 @@ These plugins add different authentication methods for logging in to the -wiki. +wiki and control what pages users can edit. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 6c475024a..d0f256ca2 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -192,6 +192,20 @@ object's "name" parameter to the authenticated user's name. Note that if the name is set to the name of a user who is not registered, a basic registration of the user will be automatically performed. +### canedit + + hook(type => "canedit", id => "foo", call => \&pagelocked); + +This hook can be used to implement arbitrary access methods to control when +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. + ### formbuilder hook(type => "formbuilder_setup", id => "foo", call => \&formbuilder_setup); |