X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fplatal.inc.php;h=a17448216e8e072d1629219eef879499fb6ad0ec;hb=a59a4446b3f96e25620e98d4aab14860dd2ee951;hp=a638d0d23bef612b7ceb792e54ede281719c1a69;hpb=15ba1697972827b89892b9866c4f6c0859c67ce8;p=platal.git diff --git a/include/platal.inc.php b/include/platal.inc.php index a638d0d..a174482 100644 --- a/include/platal.inc.php +++ b/include/platal.inc.php @@ -24,14 +24,24 @@ $TIME_BEGIN = microtime(true); require_once dirname(__FILE__) . '/version.inc.php'; require_once dirname(__FILE__) . '/misc.inc.php'; -define('PERMS_EXT', 'ext'); +// Common basic permission flags. define('PERMS_USER', 'user'); define('PERMS_ADMIN', 'admin'); -define('SKINNED', 0); -define('SIMPLE', 1); -define('NO_SKIN', 2); - +// Page style options, used when rendering pages. Options are exclusive. +define('SKINNED', 0); // Page is rendered with the normal skin. +define('SIMPLE', 1); // Page is rendered with a light skin (no leftnav). +define('NO_SKIN', 2); // Page content is passed as-is (use for csv, xml, ...). + +// Hook options bitmasks. Authentication options are mutually exclusive, but +// others (NO_HTTPS at the moment) are not. +// +// With PlStdHook, NO_AUTH indicates that no session will be started, and that +// the actual handler is responsible for doing authentication; DO_AUTH forces +// the engine to try to authenticate the user, including redirecting to the +// login page. Note that DO_AUTH is ignored if AUTH_PUBLIC is requested. +// +// Options NO_AUTH and DO_AUTH are ignored with PlTokenHook. define('NO_AUTH', 0); define('DO_AUTH', 1); define('NO_HTTPS', 2);