take all access flags in a document into account

2 jobs for master in 1 minute and 50 seconds (queued for 2 seconds)