adobe-apiplatform / user-sync.py

Application for synchronizing Adobe customer directories via the User Management API
https://adobe-apiplatform.github.io/user-sync.py/en/user-manual/
MIT License
87 stars 67 forks source link

Update model.py #831

Closed Luci2015 closed 5 months ago

Luci2015 commented 9 months ago

Instead of going through the details of SettingsInfo statement of each group, just copy the entire statement from the Sign response

Fixes #830

bhunut-adobe commented 9 months ago

@Luci2015, We need to utilize the Class model that @adorton-adobe defined for settings.

Luci2015 commented 9 months ago

@bhunut-adobe : reviewed fix for keeping class model as before and check if a boolean is sent over instead of a dict canUseMulticastWorkflows will not even appear in the final SettingsInfo class because of the _remove_unknownkeys function which limits results to: libaryDocumentCreationVisible: BooleanSettingsInfo = None sendRestrictedToWorkflows: BooleanSettingsInfo = None userCanSend: BooleanSettingsInfo = None userManagedWorkflowsEnabled: BooleanSettingsInfo = None allowedToShareUserCreatedWorkflows: BooleanSettingsInfo = None

bhunut-adobe commented 9 months ago

@Luci2015 Why not just add canUseMulticastWorkflows attribute to SettingsInfo class?

ddybvig-adobe commented 9 months ago

I tried adding the canUseMultiCastWorkflows field to SettingsInfo, but I still get the same error as before.

Luci2015 commented 9 months ago

@bhunut-adobe : Andrew discarded also some other statements that come from the Sign response (last time it was widgetCreationVisible). It's the reason why he added the _remove_unknownkeys function in the first place. Only the 5 above were kept for some reason. I can add it, no issue, but the proposed solution should be sufficient to get back to the previous state of the tool -> your call

ddybvig-adobe commented 8 months ago

Hi @Luci2015 , it looks like Sign Engineering fixed this on stage as shown here. For now, I am going to leave this PR unmerged in hopes that they deploy this change to production soon. If a need does arise for a signed build and release of UST before then, let me know.