XE-521: AllDocs's attachment tab requires programming right to work
Fixed problem with the query