-
-
Notifications
You must be signed in to change notification settings - Fork 129
Could not add user to "admins" group #822
Copy link
Copy link
Closed
Labels
enhancementIssues or PRs that enhance existing featuresIssues or PRs that enhance existing features
Description
Describe the bug
I want to add new user to admins user group via REST API v2, but PATCH request fails with 400 code FIELD_INVALID_CHOICE
To Reproduce
Steps to reproduce the behavior:
curl -X 'PATCH' \
'https://10.1.20.200/api/v2/user/group' \
-H 'accept: application/json' \
-H 'x-api-key: XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"name": "admins",
"scope": "system",
"description": "System Administrators",
"member": [
"admin", "baz"
],
"priv": [
"page-all"
]
}'
Expected behavior
User baz should be added to the group admins
Screenshots or Response
{
"code": 400,
"status": "bad request",
"response_id": "FIELD_INVALID_CHOICE",
"message": "Field `scope` must be one of [local, remote]",
"data": []
}
pfSense Version & Package Version:
- pfSense Version: [e.g. pfSense 2.8.1]
- Package Version [e.g. v2.6.2]
Affected Endpoints:
- URL: [e.g. /api/v2/user/group]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementIssues or PRs that enhance existing featuresIssues or PRs that enhance existing features