Ability to lock users' profile pictures through the API

Idea created by Alexander McPherson on Aug 20, 2018
    Open for Voting
    Score7
    • Ben Lloyd
    • Joni Miller
    • Rob Ditto
    • Alexander McPherson
    • Adam Cutler
    • Zach Arnold
    • Kristin Lundstrum

    So I have written/modified a script that uploads all of the school photos for our students, and I now wish to lock the profile picture that I have just uploaded so that the students cannot change their profile pictures to unprofessional and unhelpful images. The API shows that you can get some of the permissions associated with a user (Users - Canvas LMS REST API Documentation ), but there is no function of the API visible that allows for me to change user[permissions][can_update_avatar] to false after uploading and setting the user's picture. I did try a PUT request but got an error message saying I am not authorised to perform that action as an administrator.  

     

    I just want to be able to use the API to disable the user's permission to change the avatar, as doing this by hand for 750+ users is not a viable solution, and requires a lot of manual input for a task we would prefer to automate. So far as I can tell, there is no workaround for this yet apart from running this script every night and we would prefer not to do that.

     

    Thanks,

    Alex.

     

    avatar picture permission api calls api