exceptions: Add AccessDeniedError.

This commit is contained in:
PIG208
2021-07-04 14:45:34 +08:00
committed by Tim Abbott
parent 72f9f964a1
commit a6e88a5a76
4 changed files with 26 additions and 6 deletions

View File

@@ -375,3 +375,14 @@ class InvitationError(JsonableError):
self.errors: List[Tuple[str, str, bool]] = errors
self.sent_invitations: bool = sent_invitations
self.license_limit_reached: bool = license_limit_reached
class AccessDeniedError(JsonableError):
http_status_code = 403
def __init__(self) -> None:
pass
@staticmethod
def msg_format() -> str:
return _("Access denied")