'From etoys3.1 of 12 October 2008 [latest update: #2194] on 15 December 2008 at 12:27:24 pm'! "Change Set: FixnOnSugarSandBox-yo Date: 15 December 2008 Author: Yoshiki Ohshima The logic was wrong when to enable the sandbox."! !SecurityManager methodsFor: 'security operations' stamp: 'yo 12/15/2008 12:09'! enterRestrictedMode "Some insecure contents was encountered. Close all doors and proceed." self isInRestrictedMode ifTrue:[^true]. (SugarLauncher isRunningInRainbow or: [Preferences securityChecksEnabled not]) ifTrue: [^true]. "it's been your choice..." Preferences warnAboutInsecureContent ifTrue:[ (PopUpMenu confirm: 'You are about to load some insecure content. If you continue, access to files as well as some other capabilities will be limited.' translated trueChoice:'Load it anyways' translated falseChoice:'Do not load it' translated) ifFalse:[ "user doesn't really want it" ^false. ]. ]. "here goes the actual restriction" self flushSecurityKeys. self disableFileAccess. self disableImageWrite. "self disableSocketAccess." FileDirectory setDefaultDirectory: self untrustedUserDirectory. ^true ! !