-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Extend Accounts with multivalue properties (PropertyCollection) #27189
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
Conversation
510f6ba to
44827e3
Compare
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
- in fact the API could be done in a nicer way and it might be possible to work without IAccountPropertyCollection, but only with the IAccountProperties. - To keep it simple at first and not overengineer the blunt attempt is followed - If necessary helpful in the further cause of development adjustements or extensions can be done quickly with this base Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
|
need to convince psalm tomorrow |
|
@blizzz I'll be working on frontend integration so any more helper functions would be great 🙌, on the backend I'll leave the nitty-gritty logic for you to work on though I'll probably be working on the UsersController as we're using the provisioning_api :) |
e4e8e36 to
8235d90
Compare
8235d90 to
35d5395
Compare
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> psalm happiness Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
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.
approving myself on behalf of @skjnldsv
In
IAccountManagermultivalue properties are declared as constants prefixedCOLLECTION. One such constant was added:COLLECTION_EMAILThe
IAccountPropertyCollectionis introduced which is a container forIAccountProperties.IAccountwas extended with three methods. Two that are there for setting and getting property collections. The thought behind this is to keep the API stable and is oriented on the existing methods for consistency. Another,getAllProperties()was introduced in order to deprecategetPropertieswhich is left untouched for backports compatibility. Both methods returnIAccountProperty[], but the old method uses the property name as index, which is not possible with multiple values. The new method flattens the Collections and returns each value as its ownIAccountPropertyfor simplicity.Contrary
getFilteredPropertieswas adjusted to return all values matching the criteria also from collections (also flattened). The resulting array structure was not documented before and was therefore adjusted (associative, index names of collections are appended by #0, #1…). This is backwards compatible.And of course the concrete implementations are adjusted.
contributes to #26866
(fwiw, this is @blizzz writing and owning it, not @skjnldsv)