Skip to content

google: Check ownership in is_owner() without additional HTTP request

Mayank Sharma requested to merge mayanksha/gvfs:fix-is-owner into master

Earlier, we were fetching ACL feed of an entry and then checking the ownership by comparing account identity with elements from this feed. This was slow due to Network IO being performed while checking ownership.

We now use GDataAuthors on a GDataEntry to get the list of "owners" of the file. We then use the GoaObject stored on GDataGoaAuthorizer to get the account which is being used by GDataService. Finally, we take the email address of account and compare them to check the ownership. This method now runs without anymore additional network requests.

Edited by Mayank Sharma

Merge request reports