It returns 5 files, which i can see, i have permission on them, but problem is, when someone remove permission from one file, then within next call i will get 403 response. Until SOLR is no't reindexed. This is from my point of view unexpected behaviour. Can i exclude files, which i can't see from results? I know why this is happening, because of SOLR reindex process, which is, he still see 5 files, but when he is trying to return files properties will fail, beacause i don't have permission anymore. My question is, how can i solve this problem?
Can you check your Alfresco alfresco-global.properties for any value set for the security.anyDenyDenies? This value should be set to true (default value if not set in your alfresco-global.properties) and should apply cause post-filtering to be applied to any results from SOLR, so these nodes that you can't access because of changed and as-of-yet unindexed ACLs should be filtered out before any attempt to write their metadata is made. They would have had to consciously / deliberately work around this to mess it up in the v1 ReST API.