Issue Summary
Deactivating a user via PATCH call towards /align/api/2/Users/id endpoint produces the following inconsistent results.
- Missing audit logs
- Discrepant locked value
- Discrepant status value
- Discrepant action button
Steps to Reproduce
- Obtain a valid token
- The corresponding user must be either Super Admin or has enough privileges in the UI to perform user deactivation
- Make a GET call towards /align/api/2/Users/id endpoint, for validating the token
- Make a PATCH call towards /align/api/2/Users/id endpoint, using the document below
Use the following JSON patch document (as per https://json-patch-builder-online.github.io/):
[ { "op": "replace", "path": "/locked", "value": -1 } ]
- Make a GET call towards /align/api/2/Users/id endpoint, for validating results
Expected Results
- In PATCH call, the "value" parameter should equals to "-1" for deactivating a user, instead of "1" (in accordance to when the user is deactivated via UI)
- In UI, "action" button should be labeled "Activate", rather than "Deactivate"
- The "userEndDate" parameter should be filled adequately, rather than "NULL"
- Corresponding Audit Log entry is missing for activate/deactivate operations performed via API – as apposed to when the same actions are performed in the UI
Actual Results
Visual Differences
JSON Differences 1
Deactivated via UI | Deactivated via API | ||
---|---|---|---|
"userEndDate": "2020-06-03T00:00:00Z", |
OK | "userEndDate": null, |
Null |
"locked": -1,
|
OK | "locked": 1,
|
Inconsistent with UI results and with source code style |
"status": "Active", |
Should be Inactive |
"status": "Inactive", |
OK |
Audit Log
Operation | UI | API |
---|---|---|
Activation | ||
Deactivation |
Caption:
Expected/Present Unexpected/Absent
NOTES
- Just relevant objects are shown
Workaround
- For deactivating a user via API 2.0
- Use "value": 1 instead of "value": -1 when making the PATCH call
- For the other remaining symptoms:
- Currently there is no known workaround for this behavior. A workaround will be added here when available.
- is related to
-
JIRAALIGN-4742 API - Reactivating a user that was deactivated a long time ago produces error 400 - UserEndDate cannot be set before 1 days in past.
- Closed
- resolves
-
ALIGNSP-3774 Loading...
- Wiki Page
-
Wiki Page Loading...
(1 Wiki Page)