Panopto API 104: Adding group permissions to the parent folders

Return to the Panopto API index page

On page 103 I made a system that turns course folders that looks like this


Into a folder structure like this

> ARCH1001
>> ARCH1001-12345-12-13
>> ARCH1001-12345-13-14
> ARCH1002
>> ARCH1002-23456-12-13

But in that page I mentioned that you should never run the code on its own as the user of ARCH1002-23456-13-14 would not have access to the parent folder ARCH or ARCH1002, and therefore you would run into problems.

The following code fixes that by adding the groups contained within the Blackboard course and adding it to the subject and course folder.

Permissions required are in AccessManagement, so you’ll need a new AuthenticationInfo object

And to make up a new instance of a class to actually do the work

While we’re looping through the root folders dictionary, get the current folder security from the blackboard folder

Then when we know the ID of the folders we’re making / moving the video into we can add the groups we know of into that subject folder id

and the same again for the course folder

That’s it. That’s all you need to do to update folders with group permissions.

Note: If you need users as well then you can call

Full code below

Return to the Panopto API index page

Leave a Reply

Your email address will not be published. Required fields are marked *