Trouble with "restricted" upload folders
Whenever you're not using the shortcut syntax with single braces you need to acces the element via object.

So add that var before owner etc. and you should be good.

One thing I noticed is that you can't use ternary syntax for conditionals within short syntax either but with Twig code you can:

{{ object.owner.author ? object.owner.author.friendlyName }}