-
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
Make things support multi-owner #2454
Conversation
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
Thank you for submitting a PR. Please fix the long line:
Also, please add a unit test to verify your changes. |
@0candy this is strange, because I don't change this line, it's original line 222 in role.js About the test, I will do that, but not sure how. |
@upupzealot You're right, there is an extra indent for that line as it was moved into the if block. |
Can one of the admins verify this patch? |
any progress? |
++++1 |
Can one of the admins verify this patch? |
3 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
@bajtos Please review. |
I am not familiar with this part of our codebase, I believe @raymondfeng and/or @ritch are more suitable to review this patch. BTW the code needs rebasing on top of the current master, |
Hi :) Are you still planing to integrate this feature? Thanks. |
+1 |
Good day When can we expect this feature to be available in the master? Regards. |
@upupzealot Could you please rebase your code? @raymondfeng Could you please review? |
@0candy conflict in the test. How to solve this? |
Did "Allow edits from maintainers", hope it would help somehow. |
When a model has two or more "belongsTo" relations, $owner will check them all, instead of only checking the first one.
Hi @upupzealot , I rebased onto your branch, however some of the unit tests are failing. Could you please take a look? Thanks! |
@@ -210,26 +210,42 @@ module.exports = function(Role) { | |||
if (callback) callback(null, matches(ownerId, userId)); | |||
return; | |||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That way you allow multiple owner only when it's not base on the userId
/ owner
field ... see https://github.com/strongloop/loopback/pull/3106/files for my implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pierreclr Hi, for some reason I'm no longer maintaining this pr, it's glad to see somebody else fulfilled the request for mult-owner. Hope to see this be merged into the matser soon.
Closing in favour of #3106 |
When a model has two or more "belongsTo" relations, $owner will check
them all, instead of only checking the first one.