changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / auth / you.php
1 <?php
2
3 /*
4    Use this plugin, if you just want to make your Wiki readonly and have
5    a possibility to 'login' as superuser, when needed.
6
7    When you are queried for your login data, you can use whatever you want
8    for user/login name, but the following will be your master-password:
9 */
10
11 #-- your password:
12 define("YOUR_PASSWORD", "*");
13 define("YOUR_LEVEL", 0);                 //  0 = superuser
14
15 #-- change to read-only mode per default:
16 define("EWIKI_PROTECTED_MODE", 1);
17 define("EWIKI_AUTH_DEFAULT_RING", 3);    //  3 = read/view/browse-only
18
19 #-- your prefered login plugin:
20 include("plugins/auth/auth_method_http.php");
21 //include("plugins/auth/auth_method_form.php");
22
23 #-- you'll also want this:
24 include("plugins/auth/auth_perm_ring.php");
25
26
27 #-- glue
28 $ewiki_plugins["auth_userdb"][] = "ewiki_auth_userdb_your_password";
29
30
31 #-- sorry, nothing impressive here
32 function ewiki_auth_userdb_your_password($username, $password=false) {
33    return(array(YOUR_PASSWORD, YOUR_LEVEL, "the great superuser 2.0", $_SERVER["SERVER_ADMIN"]));
34 }
35
36
37 ?>