3 $AuthFunction = 'AuthPlatal';
5 $Conditions['logged'] = S
::logged();
6 $Conditions['identified'] = S
::identified();
7 $Conditions['has_perms'] = S
::has_perms();
8 $Conditions['public'] = 'true';
10 $HandleAuth['diff'] = 'edit';
11 $HandleAuth['source'] = 'edit';
13 // impossible to see the diff without the source because of the smarty tags
14 $DiffShow['source'] = 'y';
17 // for read pages: will come only once so we have to be careful
18 // and translate any auth from the wiki to smarty auth
19 function AuthPlatal($pagename, $level, $authprompt)
21 global $Conditions, $page;
23 $page_read = ReadPage($pagename);
25 $levels = array('read', 'attr', 'edit', 'upload');
27 if (S
::identified() && S
::has_perms())
29 $page_read['=passwd'] = $passwds;
30 $page_read['=pwsource'] = $pwsources;
35 // if we arrive here, the user doesn't have enough permission to access page
37 // maybe it is because he is not identified
38 if ($authprompt && !S
::identified()) {
39 require_once dirname(__FILE__
).'/../classes/Platal.php';
40 require_once dirname(__FILE__
).'/../classes/PLModule.php';
41 $platal = new Platal();
42 $platal->force_login($page);
46 $page->trig('Erreur : page Wiki inutilisable sur plat/al');