4 This auth/permission plugin wraps the two older configuration constants
5 into the newer auth pluginterface. You should however prefer to drop
8 EWIKI_EDIT_AUTHENTICATE
9 You can cripple ewiki to require authentication per default by
10 setting this constant to 1.
11 This will need a wrapper script (see fragments/homepage.src) which
12 sets $ewiki_author if it detects a registered/logged-in user.
15 You can however pre-define this constant for registered users
16 of yoursite.php. The newly created page will again have the
17 READONLY flag set, so unregistered users won't be able to
18 change the new version as well.
21 //-- overwriting of read-only pages
22 define("EWIKI_ALLOW_OVERWRITE", 0);
24 //-- allow to edit a page (if all were locked)
25 define("EWIKI_EDIT_AUTHENTICATE", 0);
28 $ewiki_plugins["auth_perm"][0] = "ewiki_auth_perm_old";
30 function ewiki_auth_perm_old($id, &$data, $action, &$ring) {
38 if (EWIKI_EDIT_AUTHENTICATE) {
39 if (empty($ewiki_author)) {
47 if (EWIKI_ALLOW_OVERWRITE) {