The 1000 steps program to MDriven Chapter 11
(Created page with "Chapter 11 332 Go to wiki Model Examples, download SysUserAuthentication model 333 Open and Merge in the downloaded file 334 Verify that the SysSingleton has the property Is...")
 
No edit summary
Line 1: Line 1:
Chapter 11
Chapter 11
Video: https://www.youtube.com/watch?v=j7NfjVZgZ38
332 Go to wiki Model Examples, download SysUserAuthentication model
332 Go to wiki Model Examples, download SysUserAuthentication model



Revision as of 15:32, 26 November 2022

Chapter 11

Video: https://www.youtube.com/watch?v=j7NfjVZgZ38

332 Go to wiki Model Examples, download SysUserAuthentication model

333 Open and Merge in the downloaded file

334 Verify that the SysSingleton has the property IsSingleton set in the objects inspector

335 Make sure you understand the Singleton pattern - check the wiki and also google the concept: https://en.wikipedia.org/wiki/Singleton_pattern

336 Start the prototyper with XML peristence

337 Test the oclSingleton operator in the prototyper - ensure you get an object

338 Select the SysSingleton CurrentUser association in the class diagram - check that Peristent is set to false and thus the association is transient

339 Select the SysSuperClass in the diagram - check the OnCreate and OnUpdate on the wiki

340 Make sure you understand what OnCreate and OnUpdate actually does - make use of the debugger to verify your theory on how it works

341 Ensure that the SysSuperClass is the default super class for the AuthenticationPackage

342 Check the oclIsTypeOf and oclKindOf and superTypes operators in the debugger

343 Set the Default super class of Package1 to the SysSuperClass

344 Start the debugger or refresh the model - make sure Person now has the ChangeTime attribute

345 In the debugger set the empty Guid property to a new guid for all persons

346 When you save the persons - ensure the changetime is updated

347 Start Local Turnkey Prototyper

348 Try and login with any user

349 register a new user with email and pwd

350 Go to debugger - check that you have a new SysUser object

351 Go to CarSeeker ViewModel - set AccessGroup to IsLoggedIn - save

352 Ensure you cannot see CarSeeker when you are not logged in

353 Ensure you can see CarSeeker when you are logged in

354 Go to AccessGroup-tool button

355 Check the expressions that build up the IsLoggedIn access group - make sure you understand them

356 Add a new access group - IsAdministrator

357 Refresh AutoForms - make sure you get autoforms for SysUser

358 Go to AutoformsysUser - set access group IsAdministrator

359 Do the same for AutoFormSysUserSeeker

360 Ensure you dont get access

361 Create a new ViewModel name AccessDenied - make it explain that user dont have access

362 Use the debugger and set the user as IsAdmin - save

363 Ensure you get in to AutoFormSysUserSeeker since you now are a administrator

364 Create a new user b@b.se or whatever - log in as that - make sure this user does not reach the AutoFormSysUserSeeker - but instead end up at the AccessDenied view

This page was edited 7 days ago on 04/12/2024. What links here