profile: use PATCH method to update profile in authentic (#11417)
This commit is contained in:
parent
48fb6c2522
commit
d95303a433
|
@ -298,8 +298,8 @@ def _http_request(url, method='GET', body=None, headers={}, timeout=None):
|
|||
def http_get_page(url, headers={}, timeout=None):
|
||||
return _http_request(url, headers=headers, timeout=timeout)
|
||||
|
||||
def http_put_request(url, body=None, headers={}, timeout=None):
|
||||
return _http_request(url, 'PUT', body, headers, timeout=timeout)
|
||||
def http_patch_request(url, body=None, headers={}, timeout=None):
|
||||
return _http_request(url, 'PATCH', body, headers, timeout=timeout)
|
||||
|
||||
def http_post_request(url, body=None, headers={}, timeout=None):
|
||||
return _http_request(url, 'POST', body, headers, timeout=timeout)
|
||||
|
|
|
@ -23,7 +23,7 @@ from quixote import get_publisher, get_response
|
|||
from qommon.form import (CompositeWidget, SingleSelectWidget,
|
||||
WidgetListAsTable, ComputedExpressionWidget)
|
||||
from qommon.ident.idp import is_idp_managing_user_attributes
|
||||
from qommon.misc import http_put_request
|
||||
from qommon.misc import http_patch_request
|
||||
from qommon.publisher import get_cfg, get_logger
|
||||
|
||||
from wcs.api_utils import sign_url, get_secret_and_orig, MissingSecret
|
||||
|
@ -182,7 +182,7 @@ class UpdateUserProfileStatusItem(WorkflowStatusItem):
|
|||
payload = json.dumps(payload)
|
||||
|
||||
def after_job(job):
|
||||
response, status, data, auth_header = http_put_request(url,
|
||||
response, status, data, auth_header = http_patch_request(url,
|
||||
payload, headers={'Content-type': 'application/json'})
|
||||
if status != 200:
|
||||
get_logger().error('failed to update profile for user %r', user)
|
||||
|
|
Loading…
Reference in New Issue