Make a Box folder readonly
I am looking for the most efficient way to make a folder readonly for all users. Make everyone except for the admin user Viewer only permission to the folder, any subfolders and all files under a folder.
Question:
1. Do I need to traverse all folders and files and change permissions or is there a better way to accomplish this?
2. I would like to avoid triggers if any to the files and folders. Does this qualify as change and if there are any events attached, do they get triggered? If so, I would first like to disable the triggers.
NOTE: I am new to box API.
-
Hi , Box follows a waterfall model which means that any user has the same permissions down from the folder they are shared in at. In your situation this means that you only need to update the permission at the level where a user is shared in at. This does mean that if a folder is within multiple parent folders that you'd have to update this for every user collaborated at every level.
That said, it might be easier to move the folder and re-add all users with read-only permissions.
As for question #2: I am not quite sure what you mean here. I think you are asking if a change of permissions of a collaboration would trigger any other events? The answer is yes, it would appear in the Event Stream and any app listening to changes in permissions would pick this up. I can't tell you if your enterprise has any app set up to listen to this event on your folder.
-
Hi ,
Thank you for your quick response. I believe I was looking at this in a little wrong direction where I was planning to make folder and files readonly. What I really need to do is given a particular user, find all files and folders where the user is an owner and make them readonly for him as well as any contributors. So, I will need to test this out, but I believe if the user owns a file or folder at any level it should come up in the list of all files and folders owned by user query.
This need to be done using script/programmatically. If there is a good pointer which can help me, that would be great. Thanks for your reply and now I understand the problem little better.
Regarding #2: Thanks you guessed correctly what I was asking and thanks for your response.
Please sign in to leave a comment.
Comments
2 comments