You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
roles.has_permissions returns True for permissions the role does not hold #2184
POST /v1/authz/roles/{id}/has-permission answers 200 whenever the check runs. The answer is the boolean body ("type": "boolean" in the OpenAPI spec). The client ignores the body, so every permission on an existing role reads as held. A missing role (404) still returns False.
The code is the same on main (38f30c1) and in 4.23.1.
The second line should be False. The server returns false for the same check.
Impact
Code that gates on has_permissions treats a missing permission as granted. Code that polls it to wait for a grant to propagate returns at once. The e2e suite in weaviate-e2e-tests has such a helper (wait_for_permission), and it has never waited.
The async client has the same bug, because both paths share __has_permission.
integration/test_rbac.py only asserts that has_permissions is true for held permissions. A case that asserts False for a permission the role lacks would have caught this.
Activity