I think the whole UI need some love :P

Ben

On 07 Jan 2014, at 14:34, St�phane Ducasse <stephane.ducasse@inria.fr> wrote:

I tried

UserEditor new
user: (PharoUser username: 'stef') ;
openDialogWithSpec;
yourself.

But I could not understand how to define a password.


<Screen Shot 2014-01-07 at 18.33.05.pdf>

What is the action edit public keychain? what kind of information am i suppose to type in?

Stef


On 07 Jan 2014, at 18:28, St�phane Ducasse <stephane.ducasse@inria.fr> wrote:

Hi


I fixed the SwitchUser UI somehow (UserManager default was holding nil instead of a collection of users).
Now
SwitchUsers new
usersManager: UserManager default;
openWithSpec

I get this widget but I have no idea if I should use it to add a new user and change its access rights.
When I press + and I type a new name nothing happen.



<Screen Shot 2014-01-07 at 18.25.03.pdf>


I do not get the logic of the following

addUser
| user editor w userName newPassword |

userName := self askName.
(self isValidUsername: userName)
ifFalse: [
UIManager default inform: 'Username invalid.'.
^self ].

user := PharoUser username: userName.
user unlock ifFalse: [ ^ self ].

w := PasswordInitializationDialogWindow new.
self window openModal: w.

newPassword := w enteredValue.
newPassword ifNil: [ ^ self ].
user setPassword: newPassword.

editor := UserEditor new
user: user ;
openDialogWithSpec;
yourself.

self window openModal: editor window window.
usersManager value addUser: user.
self userManager: usersManager value.

users setSelectedItem: user username.


isValidUsername: aString
^aString isEmptyOrNil not
and: [ (self userNames includes: aString) not ].


userNames
^ self users collect: #username


So I do not get how we can get a new user.
May be the + is not needed.

Stef