From: Florent Bruneau Date: Thu, 29 May 2008 22:32:55 +0000 (+0200) Subject: Link to admin interface. X-Git-Url: http://git.polytechnique.org/?p=dotclear.git;a=commitdiff_plain;h=4eb4eebc36cd3a069761ac198c351a514583491d Link to admin interface. Signed-off-by: Florent Bruneau --- diff --git a/widget.auth.php b/widget.auth.php index 388eabe..7a41403 100644 --- a/widget.auth.php +++ b/widget.auth.php @@ -7,12 +7,12 @@ class xorgAuthWidget { static public function widget(&$w) { global $core; $name = $core->auth->userID(); - var_dump($_SESSION); - var_dump($_REQUEST); - echo "sessionid = " . session_id(); if ($name) { - return '

Tu es ' . $core->auth->getInfo('user_displayname') . '
' - . 'déconnexion

'; + $str = '

Tu es ' . $core->auth->getInfo('user_displayname') . '
'; + if ($core->auth->check('usage,contentadmin,admin', $core->blog->id)) { + $str .= 'Interface de rédaction
'; + } + return $str . 'Déconnexion

'; } else { return '

M\'authentifier via Polytechnique.org

'; }