chore: 纳入本地 Dify 1.19.0 源码及品牌与免登改动
演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
60158935f4
commit
6519682885
15831 files changed
+3063428
No files matched your search
@@ -0,0 +1,95 @@
|
||||
"""Framework-neutral failures owned by workspace application services."""
|
||||
|
||||
|
||||
class WorkspaceApplicationError(Exception):
|
||||
"""Base class for workspace use-case failures, mapped by transport adapters."""
|
||||
|
||||
|
||||
class AccountAlreadyInTenantError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidActionError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class CannotOperateSelfError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class MemberNotInTenantError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class RoleAlreadyAssignedError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class WorkSpaceNotAllowedCreateError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class WorkspacesLimitExceededError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class WorkspaceNotFoundError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class WorkspaceArchivedError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class WorkspaceNotLinkedError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class WorkspaceOwnerNotFoundError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class WorkspaceAlreadyHasOwnerError(WorkspaceApplicationError):
|
||||
"""An owner cannot join a workspace that already has one."""
|
||||
|
||||
|
||||
class InvalidWorkspaceMemberRoleError(WorkspaceApplicationError):
|
||||
pass
|
||||
|
||||
|
||||
class OwnerTransferSendIPLimitedError(WorkspaceApplicationError):
|
||||
"""The caller IP exceeded the ownership-transfer email-send policy."""
|
||||
|
||||
|
||||
class OwnerTransferSendRateLimitError(WorkspaceApplicationError):
|
||||
"""Too many ownership-transfer confirmation messages were requested."""
|
||||
|
||||
def __init__(self, retry_after_minutes: int) -> None:
|
||||
super().__init__("Too many ownership-transfer confirmation messages")
|
||||
self.retry_after_minutes = retry_after_minutes
|
||||
|
||||
|
||||
class OwnerTransferVerificationLimitError(WorkspaceApplicationError):
|
||||
"""Too many invalid ownership-transfer verification codes were submitted."""
|
||||
|
||||
|
||||
class InvalidOwnerTransferTokenError(WorkspaceApplicationError):
|
||||
"""The ownership-transfer token is missing or invalid."""
|
||||
|
||||
|
||||
class InvalidOwnerTransferEmailError(WorkspaceApplicationError):
|
||||
"""The ownership-transfer token belongs to another email address."""
|
||||
|
||||
|
||||
class InvalidOwnerTransferCodeError(WorkspaceApplicationError):
|
||||
"""The verification code does not match the ownership-transfer token."""
|
||||
|
||||
|
||||
class WorkspaceInvitationQuotaError(WorkspaceApplicationError):
|
||||
def __init__(self, *, seats: bool = False) -> None:
|
||||
super().__init__("Workspace invitation quota exceeded")
|
||||
self.seats = seats
|
||||
|
||||
|
||||
class WorkspaceMemberLicenseQuotaError(WorkspaceInvitationQuotaError):
|
||||
"""The workspace member allowance in the license is exhausted."""
|
||||
Reference in new issue
Block a user