-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How $owner is checked is too loose #2933
Comments
basically the situation described here implies 2 different User models, at a time where authentication with multiple user based models was not supported, in such a configuration at that time, yes the scenario could happen, but the setup was not correct. in #3140 the situation will be solved OOTB provided that multiple user models are configured, and with a feature flag for setups with only one user model. so yes, it will be fixed when #3140 is landed |
Closing as a duplicate of #3081 then. |
I missed the earlier comment from @ebarault. I want to be clear that in my scenario, there was one User model. There were 2 uses of a property that pointed to an instance of User, but only one User model. Does that change things or is this still a duplicate? |
Bug or feature request
Description of feature (or steps to reproduce if bug)
When you define an ACL related to $owner, LB uses the following rules to determine if you are the owner:
However, imagine a model called cat. It has a relation called creator that points to a User. It also has a relation called "personIPukeOn", that also points to a User. In this scenario, if a cat pukes on me, but I'm not the owner, LB will still I'm the owner because the relationship points to a User model.
Link to sample repo to reproduce issue (if bug)
Expected result
Actual result (if bug)
Additional information (Node.js version, LoopBack version, etc)
The text was updated successfully, but these errors were encountered: