PasswordProtectedPreferences/de

 DRAFT, NEEDS MORE WORK 

The idea is to protect the preferences using a password, to avoid the children changing something in the prefs, causing disorder.

Principles

 * Somebody trying to open the prefs will trigger a dialog box, asking for a password : if the password is ok, continue and open the preferences dialog box, else abort
 * provide a default generic password (e.g. "professor")
 * this default password will be modifiable by the teacher, opening the prefs

Attention : the toolbars will stay customizable.

STEP 01

 * The user calls the menu "preferences" (in the menu or using shortcut, e.g. On Mac OS X)



STEP 02

 * The preferences dialog box is displayed with all disabled.
 * The user has to click on the lock/unlock button
 * Missing: Click on "Cancel" or "ESC" button returns to OOo4Kids
 * Suggestion : the active "Cancel" buttton should be aligned with the lock button



STEP 03

 * Clicking on the the unlock button displaying the dialog box to enter the password.



STEP 04

 * If the password is ok:
 * All settings are now enabled and the user can change them
 * Close the preferences dialog box, will end the feature
 * If the password is wrong:
 * An error message is provided, and the user has to click on OK to continue
 * We return to the previous dialog box ( the greyed Preferences one )
 * The preferences dialog box is displayed with all disabled, and the user has either to :
 * Validate the step with a correct password,
 * Or click on cancel to return to OOo4Kids



Implementation of Scenario #01
=> This is a draft

Model

 * Password entered length : short int
 * Is password entered correct : boolean
 * Is pref canceled : boolean
 * CanActivePrefs : boolean
 * Is new password equal to old password : boolean
 * The password itself : OUString
 * New password : OUString
 * Confirmed new password: OUString
 * Password container : setup.xcu
 * Entered password validation "Ok" : button
 * Entered password validation "Cancel" : button
 * Validation new password "Ok" : button
 * Validation new password "Cancel" : button
 * Closed lock : button + image
 * Open lock : button + image

View

 * Modal dialog box "Enter a password", with buttons "Ok", "Cancel" and one writable text area
 * Modal dialog box "Enter new password", with buttons "Confirm new password", "Ok", "Cancel" and two writable text areas

Controler
=> TBD

The controller should be based on:


 * create a new class inherited from sfx2 password
 * replace the old treeopt.cxx with a new one, including booleans and the new behavior
 * inactive prefs will be events driven: infinite look (modal Window) waiting for hit the lock or esc to cancel the prefs modification

-

As we are talking about preferences of OOo4Kids : I think we have also to review the content and the layout of this dialog box.

Because :
 * there are too many settings
 * the organisation is very confusing sometime

This is a critical related OpenOffice globaly. I think we have to keep only the majors setting and to make it clear to understand.

Another idea could be to have a Preference panel for the children with a reduce set of settings and another one with more options for the teachers. Of course it will not replace the password options proposed in this page but be a complement. Lafonjm 21 avril 2009 à 09:10 (CEST)