tazbug rev 64

Only logged users can see online users
author Christophe Lincoln <pankso@slitaz.org>
date Tue Jan 07 22:32:00 2014 +0100 (2014-01-07)
parents 1fa682f972c9
children 17bc5f665bf5
files web/plugins/dashboard/dashboard.cgi web/style.css
line diff
     1.1 --- a/web/plugins/dashboard/dashboard.cgi	Tue Jan 07 22:22:25 2014 +0100
     1.2 +++ b/web/plugins/dashboard/dashboard.cgi	Tue Jan 07 22:32:00 2014 +0100
     1.3 @@ -40,8 +40,15 @@
     1.4  		header
     1.5  		html_header
     1.6  		user_box
     1.7 +		if ! check_auth; then
     1.8 +			gettext "You must be logged in to view online user"
     1.9 +			exit 0
    1.10 +		fi
    1.11  		cat << EOT
    1.12  <h2>Online users</h2>
    1.13 +<div id="tools">
    1.14 +	<a href="$script?dashboard">Dashboard</a>
    1.15 +</div>
    1.16  <pre>
    1.17  EOT
    1.18  		for u in $(ls $sessions)
    1.19 @@ -63,11 +70,10 @@
    1.20  		html_header
    1.21  		user_box
    1.22  		if ! check_auth; then
    1.23 -			gettext "You must be logged in to view the dashboard."
    1.24 +			gettext "You must be logged in to view the dashboard"
    1.25  			exit 0
    1.26  		fi
    1.27  		if check_auth && admin_user; then
    1.28 -			# Online users should not be public ?
    1.29  			admintools="<a href='?users'>List users</a>"
    1.30  		fi
    1.31  		cat << EOT
     2.1 --- a/web/style.css	Tue Jan 07 22:22:25 2014 +0100
     2.2 +++ b/web/style.css	Tue Jan 07 22:32:00 2014 +0100
     2.3 @@ -114,7 +114,7 @@
     2.4  	margin: 40px auto;
     2.5  	padding: 0 20px;
     2.6  	text-align: justify;
     2.7 -	max-width: 680px;
     2.8 +	max-width: 720px;
     2.9  }
    2.10  
    2.11  #newbug textarea { width: 460px; }