Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Drive SDK Permissions by file/folder

We are creating a desktop application that connects to the Google Drive and perform some processing in pictures selected by the user. Note that the pictures are stored there by any means (let's say the user uploaded them using the desktop Google Drive sync tool).

Per this https://developers.google.com/drive/apps_overview the App can request permissions to either the files created by the Drive App, or to all the files.

It seems that if you create a Web Google Drive application the user would have the choice of granting permissions in a file-by-file basis.

However, what we would like if for the user to grant folder permissions to our Google Drive Desktop Application, so our software can only see the folders/files explicitly granted by the users to our application.

Otherwise we need access to all their files, and that is kind of a security concern for the user (if they have all sort of files, some might be even be sensitive, why would they give us access to that if we are working only with a subset).

Note: in my testing I am using OAuth 2, and it works fine. It is just that we are forced to request the full permissions. We are using .NET, not that it matters.

Thanks.

like image 590
rufo Avatar asked Jul 12 '12 01:07

rufo


People also ask

Can I restrict access to a folder in Google Drive?

Find the file or folder in Google Drive, Google Docs, Google Sheets, or Google Slides. Open or select the file or folder. Select Restricted. Click Done.

Do Google Drive folder permissions inherit?

Inherited permissions can't be removed from a file or folder in a shared drive. Instead these permissions must be adjusted on the direct or indirect parent from which they were inherited. Inherited permissions can be removed from items under "My Drive" or "Shared with me."


1 Answers

As you mentioned a per-folder permission would be ideal for you. We are aware of this feature and have plans for it in a future release. Some other interesting scope would be to only have access to certain file types. All of that is unfortunately not yet available and in the mean time you are stuck with using the full access drive scope (or the read-only scope if ou don't need to edit files) if you are building a desktop application.

like image 68
Nicolas Garnier Avatar answered Oct 13 '22 22:10

Nicolas Garnier