I think for a code cleanup we could try moving the whole Wopi token handling for which user is acting in the anonymous request to a middleware to make sure the preconditions are properly set for all WopiController methods. I'll look into that in a follow up.
I think for a code cleanup we could try moving the whole Wopi token handling for which user is acting in the anonymous request to a middleware to make sure the preconditions are properly set for all WopiController methods. I'll look into that in a follow up.
Originally posted by @juliushaertl in https://github.com/nextcloud/richdocuments/pull/805#issuecomment-579639958