MOD refactor member get put endpoint
Keycloak API need to use multiple specific calls (first DELETE and second PUT) to update the groups
assignement to KC users so we have done a refactor of the previous/initial strategy.
The current member
endpoint profile is (example):
- Calling PUT throw
http://odoo-ce.local:8069/api/member/8cee27a8-6a17-4354-87c0-47bdd807db59?role=role_ce_member
:
returns:
{ "member": { "keycloak_id": "8cee27a8-6a17-4354-87c0-47bdd807db59", "name": "Marta Arce", "role": "role_ce_member", "email": "marta@jeje.cat" } }
- calling GET throw
http://odoo-ce.local:8069/api/member/8cee27a8-6a17-4354-87c0-47bdd807db59
:
returns:
{ "member": { "keycloak_id": "8cee27a8-6a17-4354-87c0-47bdd807db59", "name": "Marta Arce", "role": "role_ce_member", "email": "marta@jeje.cat" } }
- in boths GET/PUT the
role
attribute must have one of those values: [role_ce_member
,role_ce_admin
,role_platform_admin
]
Merge request reports
Activity
added ToBeMerged label
requested review from @enricostn
assigned to @xavier.bonet
65 64 m_dict = {m.key: m.value for m in lead.form_submission_metadata_ids} 66 65 67 66 if m_dict.get('partner_legal_state',False) and m_dict['partner_legal_state']: 68 if m_dict['partner_legal_state'] == 'active': 67 if m_dict['partner_legal_state'] in ['active','activa']: Yes you are right. It was a misunderstood between DSuarez and me. It should be fixed and set to
active
. Nowadays there is 2 ways to 'receive' ce_creation leads: a) from excel/csv imports. b) from WP from calling lead creation endpoint. I build the process a) with 'active' and later on David build the b) with 'activa' but I don't fixed the misunderstood because I want to advise DQuilez before to proceed in order to don't breack his WP form fluxe.changed this line in version 2 of the diff
88 87 if m_dict.get('partner_map_place_form_url',False) and m_dict['partner_map_place_form_url']: 89 88 place_creation_data['external_link_url'] = m_dict['partner_map_place_form_url'] 90 89 else: 91 raise UserError( 92 _("Unable to get the External Link URL (mandatory map place field) from Lead: {} (metadata key: partner_map_place_form_url)").format(lead.name)) 90 pass 91 # TODO: build this URL 92 # raise UserError(_("Unable to get the External Link URL (mandatory map place field) from Lead: {}").format(lead.name)) Yes, in a first step I build this field mandatory but then I change it because we need to figure out it with DQuilez in order to know if the URL_form will be received from WP when calling the lead creation endpoint or if will be Odoo generated by Odoo. We need to deal with it in a next iteration.
@enricostn ja he contactat amb en Dani per resoldre aquests aspectes:
changed this line in version 2 of the diff
mentioned in commit 07056b99