Base solution for your next web application
Open Closed

Login Page #273


User avatar
0
hans abelshausen created

Hi, I have implemented Module Zero and everything works fine. Now I try to implement the Login later. What is the best way to do this? A normal user(Not logged in) can view the page and some buttons on top of the page! If the user clicks Button login, the Login Form should appear and after login the edit Buttons should also be visible! Thanks in advance Hans


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    To see how to login you can check the module zero template (<a class="postlink" href="https://github.com/aspnetboilerplate/module-zero-template">https://github.com/aspnetboilerplate/mo ... o-template</a>). That's easy. To show/hide an image based on permissions, you can use such an if in the cshtml view:

    @if(IsGranted("YourEditPermissionName"))
    {
       edit button...
    }
    

    Also, your actions should be secured with proper attributes. See authorization docs for more.