105 Security: Server Side Authorization. Views. - chempkovsky/CS82ANGULAR GitHub Wiki

Two aspects

Security has two aspects: Authentication and Authorization

Definition

read the following article as reminder

Steps required to accomplish the task

  • Before we start run "File explorer" and open the folder
    • %appdata%
  • navigate to subfolder
    • %appdata\Local\Microsoft\VisualStudio\17.0_05e4ae16\Extensions\bih0ep3d.wkk\Templates\ContextsToImport%
      • "17.0_05e4ae16" and "bih0ep3d.wkk" folders were generated dynamically at installation time. So in your case these will be other names!
Click to show the picture

project structure

  • copy "aspnetchckdbcontext.json" file in a temporary place where it will be easy to open with "Open File"-Dialog
    • Suppose, it'll be "E:\Development"-folder
      • So, new file name with a path will be "E:\Development\aspnetchckdbcontext.json"
      • This file will be used in the next steps

aspnetmodelView

  • right click Auth-folder of PhBkViews.csproj-project and run ModelViews Wizard

  • On the first page click Next-button

  • On the second page select

    • PhBkContext.csproj-project
    • aspnetchckdbcontext-DbContext
  • On the third page select

    • PhBkEntity.csproj-project
    • aspnetmodel-Entity
Click to show the picture

project structure

  • On the fourth page
    • click 'Import'-button
      • Open file-dialog will be shown
        • select "E:\Development\aspnetchckdbcontext.json"-file (we mentioned this file above)
        • click Open-button in the dialog
Click to show the picture

project structure

  • On the fourth page again
    • check Select View-Checkbox
    • select aspnetmodelView in the combo
    • click Next-button
Click to show the picture

project structure

  • On the fifth page
    • the setting must be as shown below
    • Click Next-button
Click to show the picture

project structure

  • On the sixth page

    • select ViewModel.cs.t4-script
    • click Next-button
  • On the seventh page

    • click Save-button
    • click Next-button
  • On the eighth page

    • select ViewModelPage.cs.t4-script
    • click Next-button
  • On the ninth page

    • click Save-button

aspnetroleView

  • repeat the steps as those described for aspnetmodelView
  • On the fifth page
    • the setting must be as follows
    • Click Next-button
Click to show the picture

project structure

aspnetrolemaskView

  • repeat the steps as those described for aspnetmodelView
  • On the fifth page
    • the setting must be as follows
    • Click Next-button
Click to show the picture

project structure

aspnetuserView

  • repeat the steps as those described for aspnetmodelView
  • On the fifth page
    • the setting must be as follows
    • Click Next-button
Click to show the picture

project structure

aspnetusermaskView

  • repeat the steps as those described for aspnetmodelView
  • On the fifth page
    • the setting must be as follows
    • Click Next-button
Click to show the picture

project structure

aspnetuserpermsView

  • repeat the steps as those described for aspnetmodelView
  • On the fifth page
    • the setting must be as follows
    • Click Next-button
Click to show the picture

project structure

aspnetuserrolesView

  • repeat the steps as those described for aspnetmodelView
  • On the fifth page
    • the setting must be as follows
    • Click Next-button
Click to show the picture

project structure

⚠️ **GitHub.com Fallback** ⚠️