diff --git a/base/context_processors.py b/base/context_processors.py index 1cb9bde363..27fa8581d8 100644 --- a/base/context_processors.py +++ b/base/context_processors.py @@ -17,7 +17,7 @@ def base(request): return { 'seafile_version': SEAFILE_VERSION, 'seahub_title': SEAHUB_TITLE, - 'official_mode': request.official_mode, + 'cloud_mode': request.cloud_mode, # 'account_type': settings.ACCOUNT_TYPE, } diff --git a/organizations/middleware.py b/organizations/middleware.py index 197b2a0792..2e7c52591d 100644 --- a/organizations/middleware.py +++ b/organizations/middleware.py @@ -5,9 +5,9 @@ from seaserv import get_org_by_url_prefix, get_orgs_by_user from settings import ORG_CACHE_PREFIX try: - from seahub.settings import OFFICIAL_MODE + from seahub.settings import CLOUD_MODE except ImportError: - OFFICIAL_MODE = False + CLOUD_MODE = False class OrganizationMiddleware(object): """ @@ -16,8 +16,8 @@ class OrganizationMiddleware(object): """ def process_request(self, request): - if OFFICIAL_MODE: - request.official_mode = True + if CLOUD_MODE: + request.cloud_mode = True # Get current org context org = cache.get(ORG_CACHE_PREFIX + request.user.username) @@ -27,7 +27,7 @@ class OrganizationMiddleware(object): orgs = get_orgs_by_user(request.user.username) request.user.orgs = orgs else: - request.official_mode = False + request.cloud_mode = False request.user.org = None request.user.orgs = None diff --git a/templates/admin_base.html b/templates/admin_base.html index b1110d74ce..07534b7474 100644 --- a/templates/admin_base.html +++ b/templates/admin_base.html @@ -12,7 +12,7 @@
  • 小组管理
  • - {% if request.official_mode %} + {% if request.cloud_mode %}
  • 团体管理
  • diff --git a/templates/base.html b/templates/base.html index 864a413f46..989e599b95 100644 --- a/templates/base.html +++ b/templates/base.html @@ -27,7 +27,7 @@
    {% if request.user.is_authenticated %} - {% if official_mode %} + {% if cloud_mode %} {% if org %} {{ org.org_name }} {% else %} 个人帐号 {% endif %} @@ -139,7 +139,7 @@