tazpanel rev 442
auth to change user only
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Apr 08 10:20:10 2015 +0200 (2015-04-08) |
parents | adedebded23a |
children | 169f1ccfb613 |
files | styles/default/header.html |
line diff
1.1 --- a/styles/default/header.html Wed Apr 08 09:55:46 2015 +0200 1.2 +++ b/styles/default/header.html Wed Apr 08 10:20:10 2015 +0200 1.3 @@ -87,13 +87,15 @@ 1.4 1.5 username="${REMOTE_USER:-root}" 1.6 case "$username" in 1.7 - root) icon='slitaz'; warn='';; 1.8 - *) icon='user'; warn="$(_ 'Some features are disabled.')"$'\n';; 1.9 + root) icon='slitaz'; warn='' 1.10 + toggle_url="http://tazpanel:82/";; 1.11 + *) icon='user'; warn="$(_ 'Some features are disabled.')"$'\n' 1.12 + toggle_url="http://$RANDOM:*@tazpanel:82/user/";; 1.13 esac 1.14 1.15 cat << EOT 1.16 <a data-img="$icon" title="$(_ 'You are logged in to the TazPanel as user $username.') 1.17 -$warn$(_ 'Click to re-login.')" href="http://$RANDOM:*@tazpanel:82/user/"></a> 1.18 +$warn$(_ 'Click to re-login.')" href="$toggle_url$(basename $REQUEST_URI)"></a> 1.19 <a data-img="help" href="help.cgi"></a> 1.20 </span> 1.21 </nav>