Setting Model Permissions in Views and Reports

  1. Views automatically have model permissions applied; the only thing you have to do before you can use the view gives the new Role Type access to it. Open the MPT editor, and click Book in the Outline tree.

  2. Click the Views tab in the MPT, and select the ZBKS.BooksByTitle view. In the View Details section, click the Permissions tab, and select the check box next to ZBKS.SupplierRoleType.

  3. Click images/download/attachments/144836631/submit_btn-version-1-modificationdate-1656011526000-api-v2.png Submit to submit the MPT to the server.

  4. for the report that we added earlier (AllBooks), all we have to do is add an extra expression to the WHERE clause in the SqlDef. Open reports/Bookstore.report in the Bookstore project.

    Append the following to the end of the SQL string in the SqlDef in the AllBooks report:

    AND ${customModelPermissionsWhere:Standard ZBKS.Book}

    This applies the model permissions that we established in MPT for the Book.

  5. Save the file, and then Click images/download/attachments/144836631/submit_btn-version-1-modificationdate-1656011526000-api-v2.png Submit to submit it to the server.