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.
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.
@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.