2014年4月8日 星期二

LightSwitch – Access Control, Visual Studio 2013

Access Control

2 access controls for LightSwitch, Authentication type and Permissions.

image

 

Authentication Types

There are 2 authentication types, Windows & Forms.

In this example, we use Forms authentication.

image

 

Permissions

Add 4 permissions for practice, CanAddCustomer, CanEditCustomer, CanViewCustomer and CanAddPhone

Granted for debug is a flag to allow developer to run/execute while programming

image

 

We can write code on Access Control Methods of an ApplicationData, for example, Customers.

image

 

Check if current user has pre-defined permission (CanAddCustomer) on customer insert action

image

 

It will show an Error if user does not have that permission

SNAGHTML1db84b2

沒有留言:

張貼留言