Closed kuangzq closed 7 years ago
Hi @kuangzq, Could you please provide logs for create / update object?
Thanks.
Hi there, @Pro100Andrey
I figured out finally that I did not turn on the update permission for the custom class. My bad. Sorry. Please close this issue.
Thanks.
P. S. For other people's reference, steps to turn on update permission is as follows. (1) Access your app administration at https://admin.quickblox.com/ (2) Select your custom class on Custom page (3) There is a light blue button "Edit permission" beside "Add" and "Remove" buttons on top-right of the screen, click on it (4) On the pop-up window, set "Permission level" to "Open" for the actions needed (e.g. delete and/or update) and don't forget to check the corresponding "Use class permissions"
Hi there,
I was trying to update the value of a field for a custom object but it was always returning a failure by "You don't have appropriate permissions to do this operation". I checked up my code and added
when creating the object but it still refuses to update by returning the same permission error message.
The snippet of my creating and updating the custom object is like following.
New Issue Checklist
Environment details
Did this work before? No.
Expected behavior The custom object shall be updated.
Actual behavior The custom object was not updated and an error message of "You don't have appropriate permissions to do this operation" was returned.
Logs
Please use the following template for logs:
QBResponse by errorBlock of [QBRequest updateObject:...]
```logos 2017-10-02 06:05:00.811702-0600 App[6284:2291092] [QBCore] Request URL:https://api.quickblox.com/data/MY_CUSTOM_CLASS/59cf9431f2ba08d8a0eb477d.json 2017-10-02 06:05:00.812090-0600 App[6284:2291092] [QBCore] Request method: PUT 2017-10-02 06:05:00.812328-0600 App[6284:2291092] [QBCore] Request parameters:{ confirmed = 1; } 2017-10-02 06:05:00.812795-0600 App[6284:2291092] [QBCore] Request headers: { "Accept-Language" = "en-CA;q=1, zh-Hans-CA;q=0.9, en;q=0.8, en-US;q=0.7"; "Content-Type" = "application/x-www-form-urlencoded"; "QB-OS" = "iOS 10.3.3"; "QB-SDK" = "iOS 2.9.2"; "QB-Token" = ...; "QuickBlox-REST-API-Version" = "0.1.1"; "User-Agent" = "App/2.0 (iPhone; iOS 10.3.3; Scale/2.00)"; } 2017-10-02 06:05:01.037442-0600 App[6284:2291092] [QBCore] Response error: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: forbidden (403)" UserInfo={com.alamofire.serialization.response.error.response=To enable full logs use the following code:
Steps to reproduce the behavior (1) Create a custom object according to the "// create" snippet above (2) Update the same object just created according to the "// update" snippet above
Any others comments No