Bootcamp:Chapter 11
No edit summary
No edit summary
Line 27: Line 27:
336. Start the prototyper with XML persistence.
336. Start the prototyper with XML persistence.


337 Test the oclSingleton operator in the prototyper - ensure you get an object
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
338. Select the SysSingleton CurrentUser association in the class diagram. Check that Persistent 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
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
340. Make sure you understand what OnCreate and OnUpdate actually do. 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
341. Ensure that the SysSuperClass is the default superclass for the AuthenticationPackage.


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


343 Set the Default super class of Package1 to the SysSuperClass
343. Set the Default superclass of Package1 to the SysSuperClass.


344 Start the debugger or refresh the model - make sure Person now has the ChangeTime attribute
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
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
346. When you save the persons, ensure the ChangeTime is updated.


347 Start Local Turnkey Prototyper
347. Start Local Turnkey Prototyper.


348 Try and login with any user  
348. Try and login with any user.


349 register a new user with email and pwd
349. Register a new user with email and pwd.


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


351 Go to CarSeeker ViewModel - set AccessGroup to IsLoggedIn - save
351. Go to CarSeeker ViewModel and set AccessGroup to IsLoggedIn. Save


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


353 Ensure you can see CarSeeker when you are logged in
353. Ensure you can see CarSeeker when you are logged in.


354 Go to AccessGroup-tool button  
354. Go to the AccessGroup-tool button.


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


356 Add a new access group - IsAdministrator
356. Add a new access group: IsAdministrator


357 Refresh AutoForms - make sure you get autoforms for SysUser
357. Refresh the AutoForms. Make sure you get autoforms for SysUser.


358 Go to AutoformsysUser - set access group IsAdministrator
358. Go to AutoformsysUser and set access group IsAdministrator.


359 Do the same for AutoFormSysUserSeeker
359. Do the same for AutoFormSysUserSeeker.


360 Ensure you dont get access
360. Ensure you don't get access.


361 Create a new ViewModel name AccessDenied - make it explain that user dont have access
361. Create a new ViewModel name: AccessDenied. Make it explain that the user does not have access.


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


363 Ensure you get in to AutoFormSysUserSeeker since you now are a administrator
363. Ensure you can get into AutoFormSysUserSeeker since you are now an 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
364. Create a new user b@b.se (or something else) and log in as that. Ensure that this user does not reach the AutoFormSysUserSeeker, but instead, ends up at the AccessDenied view.


Next chapter: [[The 1000 steps program to MDriven Chapter 12|Chapter 12]]
'''Next Chapter:'''
 
[[The 1000 steps program to MDriven Chapter 12|Chapter 12]]
[[Category:1000 Steps Program]]
[[Category:1000 Steps Program]]

Revision as of 08:43, 23 January 2023

This is Chapter 11. Are you looking for the start? Find it here: Chapter 1, or link to Chapter 10 (the previous chapter)

Here's the Chapter 11 Video: https://www.youtube.com/watch?v=j7NfjVZgZ38

Video 11: MDrivenEducationVideo Chapter 11

Title Content Time(Segment Start) Youtube Link

User Login, Access Groups, Default Superclass, Singleton Pattern, and Merge Model

332. Go to the Wiki Model Examples and download the 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 persistence.

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 Persistent 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 do. Make use of the debugger to verify your theory on how it works.

341. Ensure that the SysSuperClass is the default superclass for the AuthenticationPackage.

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

343. Set the Default superclass 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 the debugger and check that you have a new SysUser object.

351. Go to CarSeeker ViewModel and 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 the AccessGroup-tool button.

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

356. Add a new access group: IsAdministrator

357. Refresh the AutoForms. Make sure you get autoforms for SysUser.

358. Go to AutoformsysUser and set access group IsAdministrator.

359. Do the same for AutoFormSysUserSeeker.

360. Ensure you don't get access.

361. Create a new ViewModel name: AccessDenied. Make it explain that the user does not have access.

362. Use the debugger and set the user as IsAdmin. Save.

363. Ensure you can get into AutoFormSysUserSeeker since you are now an administrator.

364. Create a new user b@b.se (or something else) and log in as that. Ensure that this user does not reach the AutoFormSysUserSeeker, but instead, ends up at the AccessDenied view.

Next Chapter:

Chapter 12

This page was edited 3 days ago on 09/16/2024. What links here