public boolean hasDocumentPermission(final DocRef docRef, final DocumentPermission permission) {
        final Byte perm = permissions.get(docRef.getUuid());
        if (perm != null) {
            return perm >= permission.getPrimitiveValue();
        }
        return false;
    }
@return True if the passed permission is directly held or inherited
(e.g. permission == 'Use' and this document holds 'Update' which
inherits Use so return true).
stroom-security/stroom-security-impl/src/main/java/stroom/security/impl/UserDocumentPermissions.java