Bugfix: Fix an error when lock/unlock a public shared file

We fixed a bug when anonymous user with viewer role in public link of a folder can lock/unlock a file inside it

https://github.com/owncloud/ocis/pull/8472
https://github.com/owncloud/ocis/issues/7785
