What I’m looking for is for a view that would be equivalent to this SQL query.

SELECT * FROM bucket WHERE (uid=’$uid’ AND accepted=‘Y’) OR (uid=’$uid’ AND authorid=’$logginid’)

This way I could fetch all user’s testimonials even the ones not approved, if the user who is viewing the testimonials page is the owner of that testimonials page, or if not, show all given users testimonials where accepted is ==“Y”, plus testimonials not approved yet, but written by the user’s who is viewing the page.

First off you could try this in N1QL, though not production ready yet, the language is complete and this query works just fine in N1QL.

Second regarding views themselves try to write a view which maps to the data you’d like to see first, then filter based on startkey/endkey combos, write a reduction, or iterate through a list of UIDs or other values within your application code, to determine the Y/N value in the app. You would then retrieve a doc.id or meta.id and make a second request for the whole document via the API or another rest call in your application code.

You could do a simple view which returns the whole doc and if not return some other reference:

Just a quick note, I did this maybe a little too quickly as it will return values based on a Y or N value of accepted.
You’d need to modify the code of course but I wanted to provide an example you might further customize.