mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
views/streams: Add missing annotations.
This commit is contained in:
@@ -89,10 +89,12 @@ def list_to_streams(streams_raw, user_profile, autocreate=False, invite_only=Fal
|
|||||||
|
|
||||||
class PrincipalError(JsonableError):
|
class PrincipalError(JsonableError):
|
||||||
def __init__(self, principal, status_code=403):
|
def __init__(self, principal, status_code=403):
|
||||||
|
# type: (text_type, int) -> None
|
||||||
self.principal = principal # type: text_type
|
self.principal = principal # type: text_type
|
||||||
self.status_code = status_code # type: int
|
self.status_code = status_code # type: int
|
||||||
|
|
||||||
def to_json_error_msg(self):
|
def to_json_error_msg(self):
|
||||||
|
# type: () -> text_type
|
||||||
return ("User not authorized to execute queries on behalf of '%s'"
|
return ("User not authorized to execute queries on behalf of '%s'"
|
||||||
% (self.principal,))
|
% (self.principal,))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user