Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Locking the "chooser" user name? Message-ID: <7688@hoptoad.uucp> Date: 17 Jun 89 01:06:42 GMT References: <1889@dogie.macc.wisc.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 48 In article <835@unocss.UUCP>, dent@unocss.UUCP (Dave Caplinger) writes... >Can anyone suggest a way to set the "chooser" username once and then prevent >it from being changed in the future? In article <1889@dogie.macc.wisc.edu> keir@vms.macc.wisc.edu (Rick Keir, MACC) writes: > Therefore, the cleanest solution I know is to make yourself >a modified chooser, install it, and hope it doesn't get replaced >too often by a user with his/her own Font/DA mover. To modify: >get ResEdit, and a copy of the chooser in the Font/DA mover >"suitcase" file. Open this file with ResEdit, and edit the >dialog box which contains the template for the chooser's main >dialog. On my system (6.0.2) this is "DITL -16000" but your >mileage may vary; it should look familiar when you see it. >Expand the dialog box & put the edit text field for username >out of the original rectangle; then close back to normal >dimensions. Voila: all the items are present bu the >user cannot edit the field. (My thanks to Chuck Hutchins, >the Apple Education Coordinator here, for this idea). No, this doesn't work, at least on System 6.0.3 (which I'm pretty sure has the same Chooser as 6.0.2). If you move the editText item out of the box, all that means is that the user can't see it. Keyboard events still go to the field. I just spent a few minutes trying this and I was able to change my user name with the editText field out of the dialog box; I just couldn't see that I'd changed it until I moved the field back into bounds. Try it yourself. So then I tried another approach -- changing the type of the field from editText to staticText. However, it appears that the Chooser does a SetDItem to change the field type back to editText. Once again, I was able to change my user name without difficulty -- the only difference was that the usual editText "bounding box" did not appear around the text item. If either of these approaches did work, they would provide only what I usually call "Level I Security" -- that is, prevention of casual abuse by inexperienced users. Neither one would even approach "Level II", which is protection against clever users deliberately trying to circumvent the mechanisms using non-programmer tools. In my opinion, Level I security is usually pointless, but these two approaches don't even provide Level I. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com Postal: 424 Tehama, SF CA 94103; Phone: (415) 495-2934 "Next prefers its X and T capitalized. We'd prefer our name in lights in Vegas." -- Louis Trager, San Francisco Examiner