private DocumentPermission getPermFromPrimitive(final Integer primitive) {
        return NullSafe.get(primitive, prim ->
                prim == NULL_PERM
                        ? null
                        : DocumentPermission.PRIMITIVE_VALUE_CONVERTER.fromPrimitiveValue(primitive.byteValue()));
    }
Get permissions for users on documents plus any permissions that they inherit from their group membership.

@param request The Fetch request.
@return A result page of user permissions.
stroom-security/stroom-security-impl-db/src/main/java/stroom/security/impl/db/DocumentPermissionDaoImpl.java