Yes, it should work. Depending on your specific project settings the query will automatically exclude the pages that the current user does not have view permissions for.
By default Sitefinity has the view permissions check disabled, as this brings additional performance benefit when querying each item.
However you can achieve the desired functionality by enabling the FilterQueriesByViewPermissions
parameter in our Security configuration, by going to Administration ->Settings -> Advanced -> Security.
When this filter is enabled, by default all API calls, like the one you have given as an example, will be filtered, and the returned results of the query will be only the ones that the current user has the permissions to view.
For more information about the FilterQueriesByViewPermissions
setting you can also check this KB article
form our Knowledge base, hope you find it useful
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items