0001-profile-use-PATCH-method-to-update-profile-in-authen.patch
wcs/qommon/misc.py | ||
---|---|---|
298 | 298 |
def http_get_page(url, headers={}, timeout=None): |
299 | 299 |
return _http_request(url, headers=headers, timeout=timeout) |
300 | 300 | |
301 |
def http_put_request(url, body=None, headers={}, timeout=None):
|
|
302 |
return _http_request(url, 'PUT', body, headers, timeout=timeout)
|
|
301 |
def http_patch_request(url, body=None, headers={}, timeout=None):
|
|
302 |
return _http_request(url, 'PATCH', body, headers, timeout=timeout)
|
|
303 | 303 | |
304 | 304 |
def http_post_request(url, body=None, headers={}, timeout=None): |
305 | 305 |
return _http_request(url, 'POST', body, headers, timeout=timeout) |
wcs/wf/profile.py | ||
---|---|---|
23 | 23 |
from qommon.form import (CompositeWidget, SingleSelectWidget, |
24 | 24 |
WidgetListAsTable, ComputedExpressionWidget) |
25 | 25 |
from qommon.ident.idp import is_idp_managing_user_attributes |
26 |
from qommon.misc import http_put_request
|
|
26 |
from qommon.misc import http_patch_request
|
|
27 | 27 |
from qommon.publisher import get_cfg, get_logger |
28 | 28 | |
29 | 29 |
from wcs.api_utils import sign_url, get_secret_and_orig, MissingSecret |
... | ... | |
182 | 182 |
payload = json.dumps(payload) |
183 | 183 | |
184 | 184 |
def after_job(job): |
185 |
response, status, data, auth_header = http_put_request(url,
|
|
185 |
response, status, data, auth_header = http_patch_request(url,
|
|
186 | 186 |
payload, headers={'Content-type': 'application/json'}) |
187 | 187 |
if status != 200: |
188 | 188 |
get_logger().error('failed to update profile for user %r', user) |
189 |
- |