Architecture Kata “Secure Calculator”
Develop a desktop calculator software system which restricts certain operations to users of a particular math skill level.
The basic UI of the calculator should look like this:
Numbers will be entered only by pressing the 0..9 buttons, not by typing into the area where the number is displayed.
To restrict operation access the software needs to have a user administration. Users need to be registered (by some administrator to assign them to the proper level); they can login and logoff, change their password and request a password reset.
Upon start of the calculator users need to login first; the previously used user name will be suggested. If they forgot their password they can request a reset; a new password will be sent via email.
Each user is assigned a role or level. Usage of operations is limited by role, e.g. users with role “Beginner” are only allowed to use + but “Intermediate” users can also use – and *. Only “Advanced” users can also use /.
- Usage rights: Add (A), Subtract (S), Multiply (M), Divide (D)
- Roles with permissions: Beginner (A), Intermediate (A,S,M), Advanced (A,S,M,D)
- User: Email, password (store only as hash!), Role