Dela via


Lesson 4: Verifying the Applied Row-Level Security Changes

Now that you have created a filtered attribute, assigned it to the Security Filters collection, and applied model item security, you can see the effects of these security settings immediately.

In this lesson, you will create a simple Report Builder report and save it to the report server. Then, you will access the report as each of the fictitious users that you created in Lesson 1 and view the report again.

To create a Report Builder report

  1. To start Report Builder, start Microsoft Internet Explorer 6 or later versions.

  2. In the Address bar of the Web browser, type the Report Manager URL.

    By default, this is http://<ComputerName>/reports.

  3. On the Home page of the Report Manager, click Report Builder.

    The Report Builder window opens.

  4. In the Getting Started pane, select Adventure Works and then click OK.

  5. In the Entities list, select the Sales Order entity and drag it to the design area.

  6. Right-click the Account Number field heading and then click Delete.

  7. In the Entities list, select Customer.

  8. In the Fields list, select the Customer Name field and drag it to the left of the Sales Order group.

    Now, you have two groups in the design area: Customer Name and Sales Order.

  9. In the Entities list, select the Sales Person role within Customer.

  10. In the Fields list, select the First Name and Last Name fields and drag them to the left of the Customer Name group.

  11. On the Report menu, select Filter.

    The Filter Data dialog box opens.

  12. In the Entities list, verify that the Sales Order entity is selected.

  13. In the Fields list, double-click Order Date.

    The Order Date field is added to the filter.

  14. In the filter, click equals and then select On or After.

  15. In the box, type 1/1/2004.

  16. Click OK..

    The Filter Data dialog box closes.

  17. Click Run Report.

    The report headings appear and the Total Sales Order Headers: 0 is displayed. This behavior is to be expected because security filters are applied to even content managers and administrators and you were not granted permissions to the security filter in this tutorial. Next, you will save the report to the report server so that you can validate the security filters settings that you made in Lesson 2.

To save a Report Builder report to the report server

  1. On the File menu, click Save As.

  2. Navigate to a location on the Report Server where you want to save the report.

  3. In the Name box, type SecurityTutorialReport.

  4. Click Save.

    Next, you will validate that the security filters work by starting Internet Explorer as Rachel0 and running the report, and then by starting Internet Explorer as Garrett1 and running the report again.

To validate the security settings for Rachel Valdez

  1. Click Start and then point to All Programs.

  2. Right-click Internet Explorer and then click Run as.

    The Run As dialog box opens.

  3. Select the The following user option.

  4. In the User name box, type <ComputerName>/Rachel0.

  5. In the Password box, type Pass12,Word.

  6. Click OK..

    The Internet Explorer window opens.

  7. In the Address bar, type <ComputerName>/reports and then press Enter.

    The Report Manager window opens.

  8. Navigate to the SecurityTutorialReport report.

  9. To render the report, click SecurityTutorialReport.

    Only the data for Rachel Valdez is displayed.

  10. On the File menu, click Close.

    Next, you will run the report using Garrett1’s credentials.

To validate the security settings for Garrett Vargas

  1. Click Start and then point to All Programs.

  2. Right-click Internet Explorer and then click Run as.

    The Run As dialog box opens.

  3. Select the The following user option.

  4. In the User name box, type <ComputerName>/Garrett1.

  5. In the Password box, type Pass12,Word.

  6. Click OK..

    The Internet Explorer window opens.

  7. In the Address bar, type <ComputerName>/reports and the press Enter.

    The Report Manager window opens.

  8. Navigate to the SecurityTutorialReport report.

  9. To render the report, click SecurityTutorialReport.

    Only the data for Garrett Vargas is displayed.

  10. On the File menu, click Close.

Next Steps

You have successfully verified the model item security that you set on the Adventure Works report model and completed the tutorial.

This report was successful because the Sales Person entity inherits from the Employee entity. This report contains the First Name and Last Name fields from the Employee entity, so when the report is run, the Employee entity security filter is applied. You must use a field from the entity with the security filter in the report in order to apply the security filter.

Important

To help keep the computer that you used for this tutorial secure, make sure that you remove the fictitious users from the report server and remove the computer login. In addition, make sure you remove the TutorialLogin SQL Server login.