Prism Problems & Solutions: Loading Modules Based on User Roles

This course will cover how to add authorization to Prism in order for the application to load modules based on the logged in user roles.
Course info
Rating
(49)
Level
Advanced
Updated
Jan 5, 2016
Duration
33m
Table of contents
Description
Course info
Rating
(49)
Level
Advanced
Updated
Jan 5, 2016
Duration
33m
Description

Most desktop WPF Prism applications have built-in security and assigns roles to users. These roles are used to instruct the application about which aspects or features a user can access. This course will address a major concern with Prism developers regarding security and answer the question, "How do I load modules based on user roles?"

About the author
About the author

Brian Lagunas is a Microsoft MVP, a Microsoft Patterns & Practices Champion, Director of Technology for INETA, co-leader of the Boise .Net Developers User Group (NETDUG), board member of Boise Code Camp, speaker, trainer, author, and original creator of the Extended WPF Toolkit.

More from the author
More courses by Brian Lagunas
Section Introduction Transcripts
Section Introduction Transcripts

Course Introduction
You are watching this course because you are a Prism developer. You write composite, WPF, line of business applications using the Prism library. You could be a beginner who just started learning Prism. Maybe you've done some tutorials, you've watched some of my previous courses, or you could be an experienced developer, someone who's just been using Prism for a very long time. Whatever the case is for you, chances are, you've hit some roadblocks, you've run into some problems writing your production applications using Prism. Hello, this is Brian Lagunas, and welcome to my course, Prism Problems and Solutions: Loading Modules Based on User Roles. This is the third course in a series of courses, in which we take a problem/solution approach to Prism application development. Let's take a moment to discuss how each of the courses in this series is laid out. Each course will start by identifying one or more problems. In order to demonstrate the problem, we will either see a sample, or write the code necessary to reproduce the problem we are currently focused on. Each problem will then have a corresponding solution. After we have identified the problem and reproduced the problem, we will then discuss possible solutions. We will then write the code required to implement a solution for the corresponding problem. By the end of the course, you should have all the information you need to implement all of the solutions we've covered into your production applications.

Loading Modules Based on Roles
Ah, security, you know, that's probably one of the funnest things we get to do when we write applications, security. Okay, not really, but security is something that we must always consider when we do write an application. Things like, is this user logged in, can this user log in, what can this user do, what can he access, what is this user allowed to see in my application? Well writing a Prism application is no different, you still have to answer these questions. Hi, I'm Brian Lagunas, and in this module we're going to talk about how we can load Prism modules into our Prism application based on the logged in user's roles. Before we get too far, we need to clarify some terms, those terms being authentication verses authorization. Now this isn't a security talk, but you have to know this, okay? Authentication is about who you are, who is this user? If I don't know you, you're not getting in my system, if I know you, I'll let you in. And then once you're in, what are you allowed to do? So this is authorization, what can you do in my application, can you edit, can you add, can you delete, can you see this, can you see that? So this module is going to be all about authorization. We're not talking authentication, we're not solving security problems as logging in people from domains and things like that, we're solving authorizing users to see things in a Prism application, specifically loading modules, what modules are we going to load based on the user role that has already been authenticated.