Repository navigation
Add support for filtering in FindUsers request - #247
Conversation
61025a7 to
a7f0686
Compare
|
Are we sure we want to introduce a breaking change? |
|
I think is a good time to do it. I would argue this is the proper way to implement the thing. But if you prefer we can revert. Let's tag the people from own/openCloud affected by this to see what they suggest. If it's ok to keep or we revert and get other names (even if more confusing ones) |
|
@butonic What do you think? If you want we can revert this change and keep the original |
|
cc @micbar : this is a breaking change, but we can make it non-breaking at the expense of clarity. Both options are on the table so far. |
|
@jessegeens @glpatcern Sorry I haven't seen this earlier. But wouldn't it be better, and also backwards compatible, to introduce a new Request (e.g. BTW, I was just looking into similar enhancement. I'd like to do queries like "displayName contains the substring 'xyz'". Any suggestions to how this could fit into the |
|
Hi @rhafer, creating a new Request is also a breaking change, in the sense that compilation breaks when a new Request/Response is introduced but not implemented. What I thought, at the expense of clarity, was to introduce the new Filter with a different name, such as Yet, many other CS3 APIs have |
Actually (talking about the go implementation here) if the userprovider would properly embed the
Agreed.
Well, I'd just preferred if this would have been done in a none breaking manner. Additionally the implementation of FindUser() is getting somewhat clumsy IMO. |
Good to know, we should adopt that too - There are a few pending renames that would improve clarity but were pushed back to avoid to break backwards compatibility.
Yes, I'd have preferred a non-breaking change as well. Now, if we agree to go for a breaking change nonetheless for the sake of clarity and consistency, we could even drop |
|
@rhafer Answering to my question, Now, BTW a similar approach should be implemented for the Group filters, that would need a similar breaking change. Shall we bundle them and get the API fixed for good? I'd even have another breaking PR concerning OCM in the same vein! |
But can't those cases where Query it still used be turned into a Filter? I find the behavior of still having Query required and use Filter just as an additional "post Query" filter really un-intuitive.
I'd be still in favor of introducing a new Request Type for that. The 2nd best option would IMO be to get rid of the Query Parameter completely and only use Filter (maybe turn Query it into a specific FilterType). But I really don't like to have both Query and Filter in one Request. |
OK, let me give it a try on a new PR and we continue the discussion there. A caveat going in this direction is that we'll introduce the possibility to return |
This PR adds support to a
Filtertype in theFindUsersrequest, to filter for specific user types. The oldfilterparameter has been renamed to the more accuratequery.