====== Modifying Access.bit ======
**2020 10 15**
* References to ObjectLoader in Jacs and JasOI, but not in HCI.
Access.bit is created by whAdminTool using class JwDomainUserAdmin.
| loader targetObject stream | "use a 7.5 Jas image that contains the above class"
(stream := CfsReadFileStream open: 'c:\progra~2\jas\jacs\access.bit') isCfsError
ifTrue: [self error: stream printString].
stream isBytes: true.
loader := ObjectLoader new.
targetObject := loader loadFromStream: stream.
stream close.
targetObject inspect.
Smalltalk at: #DMM put: targetObject.
"---------------------------- READ THIS 6/28/19
you must use UPPERCASE for user and domain names.
Use JAS even if your logon is Jas.
Use DELL620 even if your machine is named Dell6520.
Otherwise the stupid code (somewhere) will create another account as uppercase
and the conflict will make nothing work"
(Smalltalk at: #DMM) inspect. "<------------------ make changes"
"rewrite it after changes"
| dumper targetObject stream |
targetObject:= Smalltalk at: #DMM.
(stream := CfsWriteFileStream open: 'c:\temp\access.bit.NEW') isCfsError
ifTrue: [ self error: stream printString].
stream isBytes: true.
dumper := ObjectDumper new.
dumper unload: targetObject intoStream: stream.
stream close
"check the new file"
| loader targetObject stream |
(stream := CfsReadFileStream open: 'c:\temp\access.bit.NEW') isCfsError
ifTrue: [self error: stream printString].
stream isBytes: true.
loader := ObjectLoader new.
targetObject := loader loadFromStream: stream.
stream close.
targetObject inspect.
composeStoredObject
^(OrderedCollection new)
add: self class currentDomainId;
add: self class currentUserId;
add: domains; oc of JwrDomainAccount
add: users; oc of JwrUserAccount
add: jars;
yourself