Creating Permissions in LightSwitch
For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.
In this lesson, you’ll learn how to create permissions for your LightSwitch application.
You can use permissions to restrict access to certain parts of an application, such as a screen that allows users to modify data. For example, a payroll application might allow an employee to view, but not change, their payroll information. But it might give a payroll supervisor permission to view and change payroll information for any employee. You can define permissions that allow the supervisor to have more access.
To create a permission
In Solution Explorer, open the shortcut menu for the My First Application node, and then choose Properties.
In the My First Application Properties window, choose the Access Control tab.
In the Permissions grid, choose the <Add New Permission> placeholder, and then enter
In the Display Name column, enter
In the Description column, enter
Allows access to the Products screen, and then choose the Enter key.
In this lesson, you learned how to define a permission for your application. You can assign the permission to a user or a group of users, and the permission can enable or disable screens when the application loads.
You can make permissions as granular as necessary. You can create a permission for each screen in the application, or you can apply a single permission to multiple screens. For example, you can create a Manager permission that allows managers to access several screens.
In the next lesson, you’ll learn how to apply the permission that you just created to restrict access to a screen.
Next lesson: Restricting Access to a Screen
Enabling Authorization and Creating Permissions
How to: Enable Authentication in an HTML Client App