Bug? - 4.1dev+ (Build: 20221104) - OneDrive Repository - Exception - notAllowed: The operation failed because sharing has been disabled on this site.

Bug? - 4.1dev+ (Build: 20221104) - OneDrive Repository - Exception - notAllowed: The operation failed because sharing has been disabled on this site.

by Jerry Lau -
Number of replies: 0
We are on  4.1dev+ (Build: 20221104)

Might have found a bug .. was working with previous version of 3.9.13 but not with this release.

I selected a file on my OneDrive repository and selected the radio button

"Create an access controlled link to the file" and clicked on Save but got this error instead.

Exception - notAllowed: The operation failed because sharing has been disabled on this site.

File:  /lib/classes/oauth2/rest.php
Line: 123

Error code: generalexceptionmessage
* line 123 of /lib/classes/oauth2/rest.php: core\oauth2\rest_exception thrown
* line 748 of /repository/onedrive/lib.php: call to core\oauth2\rest->call()
* line 960 of /repository/onedrive/lib.php: call to repository_onedrive->set_file_sharing_anyone_with_link_can_read()
* line 1289 of /lib/filelib.php: call to repository_onedrive->reference_file_selected()
* line 344 of /lib/filelib.php: call to file_save_draft_area_files()
* line 159 of /user/classes/form/private_files.php: call to file_postupdate_standard_filemanager()
* line 77 of /lib/form/classes/external/dynamic_form.php: call to core_user\form\private_files->process_dynamic_submission()
* line 261 of /lib/externallib.php: call to core_form\external\dynamic_form::execute()
* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()

I have reported it as such in tracker


Average of ratings: -