[freenet-dev] [freenet-cvs] r12315 - trunk/freenet/src/freenet/clients/http

Matthew Toseland toad at amphibian.dyndns.org
Sat Mar 24 17:58:54 UTC 2007


On Sat, Mar 24, 2007 at 04:57:37PM +0000, nextgens at freenetproject.org wrote:
> Author: nextgens
> Date: 2007-03-24 16:57:36 +0000 (Sat, 24 Mar 2007)
> New Revision: 12315
> 
> Modified:
>    trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
> Log:
> WelcomeToadlet: don't show shutdown/restart buttons while in restricted mode. Don't show userAlerts either as there is no much the user can do about them...

Not even the ones about download completions etc?
> 
> Modified: trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
> ===================================================================
> --- trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java	2007-03-24 16:53:43 UTC (rev 12314)
> +++ trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java	2007-03-24 16:57:36 UTC (rev 12315)
> @@ -551,7 +551,8 @@
>  		}
>  
>  		// Alerts
> -		contentNode.addChild(core.alerts.createAlerts());
> +		if(!ctx.isAllowedFullAccess())
> +			contentNode.addChild(core.alerts.createAlerts());
>  
>  		// Fetch-a-key box
>  		HTMLNode fetchKeyBox = contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-normal", "Fetch a Key"));
> @@ -594,13 +595,15 @@
>  			versionContent.addChild("#", "Freenet-ext Build #" + NodeStarter.extBuildNumber + " r" + NodeStarter.extRevisionNumber);
>  		}
>  		versionContent.addChild("br");
> -		HTMLNode shutdownForm = versionContent.addChild("form", new String[] { "action", "method" }, new String[] { ".", "get" });
> -		shutdownForm.addChild("input", new String[] { "type", "name" }, new String[] { "hidden", "exit" });
> -		shutdownForm.addChild("input", new String[] { "type", "value" }, new String[] { "submit", "Shutdown the node" });
> -		if(node.isUsingWrapper()){
> -			HTMLNode restartForm = versionContent.addChild("form", new String[] { "action", "method" }, new String[] { ".", "get" });
> -			restartForm.addChild("input", new String[] { "type", "name" }, new String[] { "hidden", "restart" });
> -			restartForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "restart2", "Restart the node" });
> +		if(!ctx.isAllowedFullAccess()){
> +			HTMLNode shutdownForm = versionContent.addChild("form", new String[] { "action", "method" }, new String[] { ".", "get" });
> +			shutdownForm.addChild("input", new String[] { "type", "name" }, new String[] { "hidden", "exit" });
> +			shutdownForm.addChild("input", new String[] { "type", "value" }, new String[] { "submit", "Shutdown the node" });
> +			if(node.isUsingWrapper()){
> +				HTMLNode restartForm = versionContent.addChild("form", new String[] { "action", "method" }, new String[] { ".", "get" });
> +				restartForm.addChild("input", new String[] { "type", "name" }, new String[] { "hidden", "restart" });
> +				restartForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "restart2", "Restart the node" });
> +			}
>  		}
>  
>  		// Activity
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://emu.freenetproject.org/pipermail/devl/attachments/20070324/04a33963/attachment.pgp 


More information about the Devl mailing list