Пример #1
0
    def get(self, request, format=None):
        info = {
            'version':
            settings.SEAFILE_VERSION,
            'encrypted_library_version':
            3 if settings.ENCRYPTED_LIBRARY_VERSION == 3 else 2,
        }

        features = ['seafile-basic']

        if is_seafile_pro():
            features.append('seafile-pro')

        if HAS_OFFICE_CONVERTER:
            features.append('office-preview')

        if HAS_FILE_SEARCH:
            features.append('file-search')

        if config.DISABLE_SYNC_WITH_ANY_FOLDER:
            features.append('disable-sync-with-any-folder')

        if hasattr(settings, 'DESKTOP_CUSTOM_LOGO'):
            info['desktop-custom-logo'] = settings.MEDIA_URL + getattr(
                settings, 'DESKTOP_CUSTOM_LOGO')

        if hasattr(settings, 'DESKTOP_CUSTOM_BRAND'):
            info['desktop-custom-brand'] = getattr(settings,
                                                   'DESKTOP_CUSTOM_BRAND')

        info['features'] = features
        return info
Пример #2
0
    def get(self, request, format=None):
        info = {
            'version': settings.SEAFILE_VERSION,
        }

        features = ['seafile-basic']

        if is_seafile_pro():
            features.append('seafile-pro')

        if HAS_OFFICE_CONVERTER:
            features.append('office-preview')

        if HAS_FILE_SEARCH:
            features.append('file-search')

        if config.DISABLE_SYNC_WITH_ANY_FOLDER:
            features.append('disable-sync-with-any-folder')

        if hasattr(settings, 'DESKTOP_CUSTOM_LOGO'):
            info['desktop-custom-logo'] = settings.MEDIA_URL + getattr(settings, 'DESKTOP_CUSTOM_LOGO')

        if hasattr(settings, 'DESKTOP_CUSTOM_BRAND'):
            info['desktop-custom-brand'] = getattr(settings, 'DESKTOP_CUSTOM_BRAND')

        info['features'] = features
        return info
Пример #3
0
    def get(self, request, format=None):
        info = {
            'version': settings.SEAFILE_VERSION,
        }

        features = ['seafile-basic']

        if is_seafile_pro():
            features.append('seafile-pro')

        if HAS_OFFICE_CONVERTER:
            features.append('office-preview')

        if HAS_FILE_SEARCH:
            features.append('file-search')

        if DISABLE_SYNC_WITH_ANY_FOLDER:
            features.append('disable-sync-with-any-folder')

        info['features'] = features
        return info
Пример #4
0
    def get(self, request, format=None):
        info = {
            'version': settings.SEAFILE_VERSION,
        }

        features = ['seafile-basic']

        if is_seafile_pro():
            features.append('seafile-pro')

        if config.DISABLE_SYNC_WITH_ANY_FOLDER:
            features.append('disable-sync-with-any-folder')

        if hasattr(settings, 'DESKTOP_CUSTOM_LOGO'):
            info['desktop-custom-logo'] = settings.MEDIA_URL + getattr(
                settings, 'DESKTOP_CUSTOM_LOGO')

        if hasattr(settings, 'DESKTOP_CUSTOM_BRAND'):
            info['desktop-custom-brand'] = getattr(settings,
                                                   'DESKTOP_CUSTOM_BRAND')

        info['features'] = features
        return info