Ids colliding between multiple models inherited from User
EDIT: June 15th 10:02 GMT+2
Hi,
I have a model Order for which I want the owners, service account or admin to access.
{
"name": "Order",
"plural": "Orders",
...,
"acls": [
{
"principalType": "ROLE",
"principalId": "$owner",
"permission": "ALLOW",
"property": "*"
},
{
"principalType": "ROLE",
"principalId": "service",
"permission": "ALLOW",
"property": "*"
},
{
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW",
"property": "*"
},
{
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY",
"property": "*"
}
]
And the models ServiceAccount and Customer both inherit form User.
I created 2 records : customerA, customerB and serviceA. customerB's id == sericeA's id.
I created a record order which customerA owns. customerA is the owner and can access the order. serviceA has the role service, therefore can access the order. customerB can also access the record - because having the same id as the serviceA it gets the role service.
customerB should not have the role service.
Is it possible that loopback is not checking the type of the logged user?
Thanks for your help.
Would you mind forking the loopback-sandbox with your project so that I can reproduce the problem with the same configs you have? Thanks!
https://github.com/strongloop/loopback/wiki/Reporting-issues#bug-report
@RudthMael Closing due to inactivity. If you are still running into problems, feel free to leave a comment and I will reopen the issue.
I am also experiencing this issue. Can it be reopened?