Within the Set Save Options tab in the query designer screen, you have the ability to limit the system roles that have permission to access and edit the query. Clicking Assign Permissions or Advanced Permissions will let you assign permissions by specific system role.
  1. On Analysis, click Information Library
User-added image
  1. Click the drop-down arrows next to the query you want to apply advanced permissions to and click Edit. NOTE: You can also click the name of the query and click Assign Permissions under Tasks on the left side of the screen
User-added image
  1. The Edit Ad-hoc Query screen appears. Select the Set Save Options tab
User-added image
  1. Click the Advanced Permissions button
  2. Select whether to assign query permissions for All Roles or only those in Selected Roles. If you choose Selected Roles, under System roles, manage the rights for each role. To grant rights to a system role, select the role and click Grant. To deny rights, click Deny. To undo a selection, click Clear
    1. NOTE: If a user has multiple system roles and any of those system roles has been denied permission for the query, even if permission is granted for another of the users system roles that user will be denied. In other words, Deny will always win if there is a conflict in permission within a user’s system rolesUser-added image
  1. You can assign permissions separately for the abilities to Run Query and Edit Query. For an ad-hoc query, you can only grant edit rights for system roles with rights to run the query. On the Edit Query tab, you cannot select All roles unless all roles are granted rights to run the query
  2. When you are done granting and denying system roles, click OK
  3. After you have assigned Advanced Permissions, text appears to describe the defined permissions. You will also see that the "Allow all users to run this query" and "Allow all users to edit this query" checkboxes are disabled on the Set Save Options tab.
User-added image