Problem
Authenticated users are not given AuthenticatedUser permissions instantly (Create, Update etc) on tables when performing Rest API calls. This was working perfectly until recently without any code change. Once you register a user you have to wait for a couple of minutes otherwise a no permissions to create entity response is returned. Has something changed at Backendless?
Steps to reproduce
- Using postman I register a new user.
- I can see this new user in the Users table with the correct role and permissions.
- I can see this new user in against the permissions in the data table with the correct role and permissions.
- I log the user in via rest to obtain the token
- I call a codeless service which creates a record
- I instantly get an error response.
- I can see the user within the data table schema has X’s against all create, update etc permissions.
If I perform the same task but wait a couple of minutes before performing step 5 everything is successful.
Please could anyone provide any information to why recently this has all of a sudden stopped working?
Thank you in advance
Steven
App ID: AACC0A59-DF6B-A90B-FF8B-F4B684723600
Hi. Could you, please clarify the steps 3 and 7?
The 3d point that the users and roles permissions are ok.
The 7th says the opposite.
Could you also try the same steps but without any additional BL (codeless and so on) – just create/receive record in the new table.
Because i’ve tried and for me all permissions work as expected.
Hi Oleg
I am having the same issue by directly accessing the table each time. So essentially:
- Register a new user (call /users/register)
- Login as the user (call /users/login)
- Perform a post on a table (observation is under the permission tab on the table the user gets X against each user permission (CREATE, UPDATE etc etc)
I then get:
{
“code”: 1011,
“message”: “User has no permission to create entity”,
“errorData”: {}
}
What table i can experiment with (i mean in your app)?
Hi try BookingNotifications
So,
- I’ve created the user1@email.com
- logged it in
- created the record in BookingNotifications
All steps without any issues.
Okay thank you. I am just going to try on this table. I was doing it on the Bookings table but this is more sensitive. I’ll respond back shortly.
Ah I can see something. The Role Permissions on the BookingNotifications table is different to that of the Bookings table. The Bookings table continues to cause a problem. For some reason it appears the Role Permissions on some tables for Rest actions have gone to a red X.
Thank you Oleg. It was an issue with permissions magically being removed on some tables which has caused this problem. Your use of a different table helped pintpoint the issue. All solved although I have no idea why these permissions went.