Google Drive permission "add but not edit" - google-drive-api

Is there any way to do this?
I want a shared folder, which will be used for resources for a project, I want to allow my developer to add new files which I will then review and use, but not to edit existing ones as then it'll bypass my review.
This is for security reasons.
Any ideas? If a solution exists for OneDrive I'd also accept it.

No, that is currently not available. You can only give them edit permission, which includes add and edit.
The best way to achieve this is to script moving any added items into a private or view-only folder.

You only have a few permissions roles that you can set.
owner
writer
commenter
reader
So, there's no quick way to do that. What I can suggest is for you to detect changes on the folder (considered as file with the MIME type application/vnd.google-apps.folder) in which the file will be added, and then change the permission of that file to reader.
Hopefully the suggestion would be sufficient for your use case.
Happy coding!

Related

How to disable copy/ download access for editors in google sheets

I would like to restrict access on google sheets so that only an "owner" can download/ copy a document.
Currently the files only allow folks tagged to viewer/ commenter access to be disabled
Is there a script that i can use to extend this to folks tagged to "editor" access as well.
Thanks
As comment by James D and as seen on the Google Support page
When you share a file with someone, you can choose what they can do with it.
View: People can view, but can’t change or share the file with others.
Comment: People can make comments and suggestions, but can’t change or
share the file with others.
Edit: People can make changes, accept or
reject suggestions, and share the file with others.
So if you want to restrict access to some documents, spreadsheets, any file, you must change the user's permission.

Sharing with others without asking for login details

I need to be able to share a file from my apple device to any user. It doesn't matter if they have an account or not, they shouldn't be asked to log in or create an account. I've tried using gdrive for Google drive but it keeps crashing. What's the best option I have?
Try https://www.box.com/. You can edit the permissions for a file so others can access it. Same as gDrive. There are other options out there too. This is just one that is pretty popular.
Here's a link that will help you do this: https://support.box.com/hc/en-us/articles/200520888-Shared-Links-Overview-and-FAQs

Moving a file into a Google Drive folder without changing its ACL

In Google Drive, when puting a file into a folder, the ACLs of the folder are added to the ACLs of the file.
Is there a way to avoid that? In my use case, a lot of user have "Can View" access on the folder, but only a subset of those will ultimately allowed to view that file. Even if we quickly follow with an ACL update request, there will be a short amount of time during which the visibility of the file is too broad for my use case.
Note that a solution involving having a short period of time during which the access is more limited that what it will ultimately be would be acceptable. Also, I am ready to use either Drive API or Document List API.
This might help
I was so happy when I found it! Unfortunately, it still cannot override file settings, in the case of a document owned by someone else than the containing folder's creator.

How to disable edit functionality for my mimetype for non-creator

For my application, I cannot let people who are not the creator of the content edit it. Viewing is fine.
Is there is way to disable the "Can edit" and "Is owner" options inside Sharing settings?
Thanks.
The only way I can think to do this is:
An account in your control actually owns the file.
The user that creates the doc gets read access in Google Drive.
Your application tracks which user "created" the document on it's own.
Document creators are able to edit the doc inside your app although your app is actually using your own account which owns the file to save changes.

How to copy permissions of one drive file to another

As i understand it a request for files.get only returns my own permissions on a file. How can i read all of them or at lest get a handle for all of the permissions to copy them to another file.
The use case would be an app which creates a related file alongside the original and wants to set the same permissions and sharing settings as the original file on the app created copy.
As you can see from previous questions, currently, this will not be possible for the restrictions you state. Sorry.
Google are aware of the importance of this feature and are working to resolve it as soon as possible.
I faced the same issue and this is the workaround I used.
1) Go to google contacts and add all the members into a custom/new group.
2) Select the file you want to share and instead of searching individuals type group label name and all the members would be automatically added.