Skip to content

Commit 93c865a

Browse files
authored
Merge pull request #1795 from weaviate/deprecate_broken_method
Deprecate broken method
2 parents 4bef4b8 + ba05f5f commit 93c865a

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

weaviate/rbac/async_.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ from .executor import _RolesExecutor
99

1010
class _RolesAsync(_RolesExecutor[ConnectionAsync]):
1111
async def list_all(self) -> Dict[str, Role]: ...
12+
@deprecated(
13+
"This method is deprecated and will be removed in Q4 25. Please use `users.get_my_user()` instead."
14+
)
1215
async def get_current_roles(self) -> List[Role]: ...
1316
async def exists(self, role_name: str) -> bool: ...
1417
async def get(self, role_name: str) -> Optional[Role]: ...

weaviate/rbac/executor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ def resp(res: Response) -> Dict[str, Role]:
5858
status_codes=_ExpectedStatusCodes(ok_in=[200], error="Get roles"),
5959
)
6060

61+
@deprecated(
62+
"""This method is deprecated and will be removed in Q4 25. Please use `users.get_my_user()` instead."""
63+
)
6164
def get_current_roles(self) -> executor.Result[List[Role]]:
6265
# TODO: Add documentation here and this method to the stubs plus tests
6366
path = "/authz/users/own-roles"

weaviate/rbac/sync.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ from .executor import _RolesExecutor
99

1010
class _Roles(_RolesExecutor[ConnectionSync]):
1111
def list_all(self) -> Dict[str, Role]: ...
12+
@deprecated(
13+
"This method is deprecated and will be removed in Q4 25. Please use `users.get_my_user()` instead."
14+
)
1215
def get_current_roles(self) -> List[Role]: ...
1316
def exists(self, role_name: str) -> bool: ...
1417
def get(self, role_name: str) -> Optional[Role]: ...

0 commit comments

Comments
 (0)