Acting as the Application Administrator

This lesson shows how to perform administrative tasks such as adding roles and users.

Acting as Administrator

To perform administrative tasks

  1. On the Start menu, choose Northwind Application.

    The Northwind Application appears.

  2. On the Navigation menu, expand the Administration node.

    Two menu items appear: Roles and Users.

To assign a permission to an existing role

  1. Click the Roles menu under Administration to display the Roles screen.

    In the Roles pane, the Administrator role appears. In the Permissions pane, the Security Administration permission appears. In the Users and Groups in this Role pane, your user name appears.

    Administrative screens

  2. In the Permissions pane, click Add, and then in the Permissions list, click View Products.

  3. On the application toolbar, click Save to save the change.

  4. Close the application, and then open it again.

    Verify that the Products screen appears.

To add a new role

  1. Click the Roles menu under Administration to display the Roles screen.

  2. In the Roles pane, click Add.

  3. In the Add New Role dialog box, type Manager, and then click OK.

  4. In the Permissions pane, click Add, and then in the Permissions list, click View Products.

  5. On the application toolbar, click Save to save the change.

    Now, two roles, Administrator and Manager, are listed in the Roles pane.

To add users

  1. Click the Users menu under Administration to display the Users screen.

    The Administrator user profile is displayed.

  2. In the Users and Groups pane, click Add.

  3. In the righthand pane, in the Name: box, type the name of a user in your domain.

    If the user name is valid, the Full Name box will contain the name.

  4. In the Roles pane, click Add, and then in the Role list, click Manager.

  5. On the application toolbar, click Save to save the changes.

    Now, two users are listed in the Users and Groups pane.

  6. In the Users and Groups pane, click Add.

  7. In the righthand pane, in the Name: box, type the name of another user on your domain.

  8. On the application toolbar, click Save to save the changes.

    This user isn’t assigned to a role and can access only the Customer Management screens.

Closer Look

This lesson showed how to log on as an administrator and then add roles and users. Once a role has been defined, you can assign it to multiple users so that they all have the same permissions. You can also assign a role to any valid security group in Active Directory.

When you added the third user, you may have noticed that you didn't assign a role. A user or group that hasn't been assigned a role has no permissions and can view only those screens for which permissions haven't been assigned.

This example uses Windows authentication. If you use Forms authentication, you create a unique User Name, FullName, and Password for the user. When you use Windows authentication, you don't have to specify passwords.

Next Steps

In the next lesson you will learn about extensions.

Next lesson: Using Extensions to Enhance LightSwitch

See Also

Concepts

How to: Deploy a 2-tier Application

Other Resources

Distributing Your Application

Deployment: Distributing and Maintaining Your Application