Skip to content

Commit

Permalink
Merge branch 'license-verify-status' into license-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
GarfieldDai committed Nov 14, 2024
2 parents 44e5176 + d199b8c commit d593d16
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 6 additions & 0 deletions api/controllers/console/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,9 @@ class NoFileUploadedError(BaseHTTPException):
error_code = "no_file_uploaded"
description = "Please upload your file."
code = 400


class UnauthorizedAndForceLogout(BaseHTTPException):
error_code = "unauthorized_and_force_logout"
description = "Unauthorized and force logout."
code = 401
6 changes: 0 additions & 6 deletions api/controllers/console/workspace/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,3 @@ class AccountNotInitializedError(BaseHTTPException):
error_code = "account_not_initialized"
description = "The account has not been initialized yet. Please proceed with the initialization process first."
code = 400


class UnauthorizedAndForceLogout(BaseHTTPException):
error_code = "unauthorized_and_force_logout"
description = "Unauthorized and force logout."
code = 401
4 changes: 2 additions & 2 deletions api/controllers/console/wraps.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
from flask_login import current_user

from configs import dify_config
from controllers.console.workspace.error import AccountNotInitializedError, UnauthorizedAndForceLogout
from controllers.console.workspace.error import AccountNotInitializedError
from models.model import DifySetup
from services.feature_service import FeatureService, LicenseStatus
from services.operation_service import OperationService

from .error import NotInitValidateError, NotSetupError
from .error import NotInitValidateError, NotSetupError, UnauthorizedAndForceLogout


def account_initialization_required(view):
Expand Down

0 comments on commit d593d16

Please sign in to comment.