When you add or edit the query, select the Set save options tab.
Click Advanced permissions. The Assign permissions screen appears.
Select whether to assign query permissions for all application users or only those in specific system roles. If you select 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.
Note: For an ad-hoc query, you can only grant edit rights for system roles with rights to generate the query. On the Edit query tab, you cannot select All roles unless all roles are granted rights to generate the query.
After you assign advanced permissions, text appears to describe the defined permissions. To edit the permissions, click Advanced permissions.
Click OK. You return to the Set save options tab.