DEV Community

Benjamin Fadina
Benjamin Fadina

Posted on

5

Developing Hotel Management App With Radzen Blazor WebAssembly (Lesson 9) Custom Security Part 5

In this lesson, I replace the textbox control for password on the login page with a password control. I then proceed to create custom tables to store roles and users in roles. Appropriate relationships between appusers,approles and usersinroles tables are created. I proceed to update the application model to generate C# POCO model classes for these tables.
I customize the AppUser model generated by RADZEN by adding a new partial class definition for the AppUser class which contains a property called RoleNames so that when a user is authenticated, the list of roles associated with the user is fetched as well. RoleNames property is decorated with NotMapped attribute. I scaffold BLAZOR pages for the two new tables using RADZEN. Lastly, I update LoginUser method inside MyAppUser controller so that when a user is authenticated, the list of roles associated with the user is fetched as well.

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs