The results returned by a search are, of course, subject to the same restrictions as any access to the repository via a particular session. In other words, a search will only return results from those sections of the repository for which the initiating session has the appropriate permissions.