Phlucious
Phlucious

Reputation: 3843

Check read/write permission to Google Fusion Table

I am interfacing with one of my Google Fusion Tables in a C++/Qt program using the GFT API and the access token authentication method. Read access to the table is restricted to users on my company's domain, and write access is restricted even further to a handful of users.

I therefore have three levels of authentication:

  1. User has read/write access (available SQL: SELECT, INSERT, UPDATE, and DELETE)
  2. User has read-only access (available SQL: SELECT)
  3. User has no access (available SQL: none)

I would like my program's interface to change based on the user's authentication level. I have figured out that I get a 403 HTTP error when the user attempts to SELECT or UPDATE without the proper permissions, but I'd like to nip that in the bud without any alarming 403 errors.

The question: Is it possible to check the GFT token's authentication level before attempting an actual query?

Upvotes: 0

Views: 202

Answers (1)

Rod McChesney
Rod McChesney

Reputation: 681

You should be able to use the Drive permissions API to find out what a user can do with the table.

Upvotes: 3

Related Questions