I was fighting to create an already tested state of: "a group [member] who can only manage users within the group foo" and kept failing, and I was thinking it's me:
And same for /access/groups/foo and similar.
Then I got angry and went to see the code.
Code:
# pveum acl modify /access/realm/pve -groups vmadmin -roles PVEUserAdmin
400 Parameter verification failed.
path: invalid ACL path '/access/realm/pve'
pveum acl modify <path> --roles <string> [OPTIONS]
Then I got angry and went to see the code.
- First, the problem seems to be API2::AccessControl::check_path() which seems to be convinced that there must be nothing after /access/groups or /access/realm.
- Second, this invalidates all the documentation related to that. (Sidenote: the documentation oscillates between "group" and "groups", "realm" and "realms".)
- Third, the repo has been slaughtered to pieces and it's impossible to see why and when this code was inserted. (no backwards pointers, or naming the original repo)
- Fourth, I see there are tests, except there seem to be no test for group or realm, which is not surprising since they'd fail immediately.