diff options
author | Richard Gallamore <ultima@FreeBSD.org> | 2019-03-16 17:59:42 +0000 |
---|---|---|
committer | Richard Gallamore <ultima@FreeBSD.org> | 2019-03-16 17:59:42 +0000 |
commit | 267808283c05907dd4b995a929da07c2e4553fa9 (patch) | |
tree | 50cab20e8d8946763e9e5422f5f783438f502c77 /www/seahub | |
parent | 88600c5be6fa0ab68c25635b93bf18dc96679b3a (diff) | |
download | ports-267808283c05907dd4b995a929da07c2e4553fa9.tar.gz ports-267808283c05907dd4b995a929da07c2e4553fa9.zip |
Notes
Diffstat (limited to 'www/seahub')
-rw-r--r-- | www/seahub/Makefile | 3 | ||||
-rw-r--r-- | www/seahub/distinfo | 6 | ||||
-rw-r--r-- | www/seahub/files/patch-seahub_api2_endpoints_search__user.py | 76 | ||||
-rw-r--r-- | www/seahub/pkg-plist | 6 |
4 files changed, 83 insertions, 8 deletions
diff --git a/www/seahub/Makefile b/www/seahub/Makefile index 83b37be8c43a..1b405f4f0745 100644 --- a/www/seahub/Makefile +++ b/www/seahub/Makefile @@ -67,8 +67,7 @@ USE_RC_SUBR= ${PORTNAME} SUB_FILES= pkg-message -do-patch: - echo "${WRKSRC}..." +post-patch: ${REINPLACE_CMD} -Ee "s|SEAFILE_VERSION = '[0-9]+\.[0-9]+\.[0-9]+'|SEAFILE_VERSION = '${SEAFILE_VER}'|" \ ${WRKSRC}/seahub/settings.py ${REINPLACE_CMD} -e 's|##FIX_WWWDIR##|${PREFIX}/${HAIWENDIR}|' ${WRKSRC}/*.template diff --git a/www/seahub/distinfo b/www/seahub/distinfo index 2a3866905b16..11e957bdcef5 100644 --- a/www/seahub/distinfo +++ b/www/seahub/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1548441650 -SHA256 (haiwen-seahub-v6.3.11-pro_GH0.tar.gz) = 05e6a33302fdd09ce805fe32e30ace6f213b2052c16cc041a27bb4f8d2704541 -SIZE (haiwen-seahub-v6.3.11-pro_GH0.tar.gz) = 26061149 +TIMESTAMP = 1552690870 +SHA256 (haiwen-seahub-v6.3.13-pro_GH0.tar.gz) = 189e8a1b73db2ec164ff505e4bb52efe0401f8a01bae415667bedea4ade84e25 +SIZE (haiwen-seahub-v6.3.13-pro_GH0.tar.gz) = 26059355 diff --git a/www/seahub/files/patch-seahub_api2_endpoints_search__user.py b/www/seahub/files/patch-seahub_api2_endpoints_search__user.py new file mode 100644 index 000000000000..4fc63eb09553 --- /dev/null +++ b/www/seahub/files/patch-seahub_api2_endpoints_search__user.py @@ -0,0 +1,76 @@ +--- seahub/api2/endpoints/search_user.py.orig 2019-03-13 07:50:12 UTC ++++ seahub/api2/endpoints/search_user.py +@@ -1,7 +1,6 @@ + # Copyright (c) 2012-2016 Seafile Ltd. + import os + import sys +-import json + import logging + + from django.db.models import Q +@@ -125,12 +124,13 @@ class SearchUser(APIView): + email_result = [] + + # remove nonexistent or inactive user +- email_list_json = json.dumps(email_list) +- user_obj_list = ccnet_api.get_emailusers_in_list('DB', email_list_json) + \ +- ccnet_api.get_emailusers_in_list('LDAP', email_list_json) +- for user_obj in user_obj_list: +- if user_obj.is_active: +- email_result.append(user_obj.email) ++ for email in email_list: ++ try: ++ user = User.objects.get(email=email) ++ if user.is_active: ++ email_result.append(email) ++ except User.DoesNotExist: ++ continue + + if django_settings.ENABLE_ADDRESSBOOK_OPT_IN: + # get users who has setted to show in address book +@@ -178,9 +178,6 @@ def format_searched_user_result(request, users, size): + return results + + def search_user_from_ccnet(q): +- """ Return 10 items at most. +- """ +- + users = [] + + db_users = ccnet_api.search_emailusers('DB', q, 0, 10) +@@ -204,12 +201,10 @@ def search_user_from_ccnet(q): + return email_list + + def search_user_from_profile(q): +- """ Return 10 items at most. +- """ + # 'nickname__icontains' for search by nickname + # 'contact_email__icontains' for search by contact email + users = Profile.objects.filter(Q(nickname__icontains=q) | \ +- Q(contact_email__icontains=q)).values('user')[:10] ++ Q(contact_email__icontains=q)).values('user') + + email_list = [] + for user in users: +@@ -218,11 +213,9 @@ def search_user_from_profile(q): + return email_list + + def search_user_from_profile_with_limits(q, limited_emails): +- """ Return 10 items at most. +- """ + # search within limited_emails + users = Profile.objects.filter(Q(user__in=limited_emails) & +- (Q(nickname__icontains=q) | Q(contact_email__icontains=q))).values('user')[:10] ++ (Q(nickname__icontains=q) | Q(contact_email__icontains=q))).values('user') + + email_list = [] + for user in users: +@@ -231,8 +224,6 @@ def search_user_from_profile_with_limits(q, limited_em + return email_list + + def search_user_when_global_address_book_disabled(request, q): +- """ Return 10 items at most. +- """ + + email_list = [] + username = request.user.username diff --git a/www/seahub/pkg-plist b/www/seahub/pkg-plist index d9b9ffd916fd..312774769b92 100644 --- a/www/seahub/pkg-plist +++ b/www/seahub/pkg-plist @@ -445,7 +445,7 @@ %%SEAHUBDIR%%/media/assets/scripts/app/views/file-comment.js %%SEAHUBDIR%%/media/assets/scripts/app/views/file-comments.7f3423873020.js %%SEAHUBDIR%%/media/assets/scripts/app/views/file-comments.js -%%SEAHUBDIR%%/media/assets/scripts/app/views/fileupload.cc2741e44499.js +%%SEAHUBDIR%%/media/assets/scripts/app/views/fileupload.88a6a8139191.js %%SEAHUBDIR%%/media/assets/scripts/app/views/fileupload.js %%SEAHUBDIR%%/media/assets/scripts/app/views/folder-perm.be46700663d0.js %%SEAHUBDIR%%/media/assets/scripts/app/views/folder-perm.js @@ -601,11 +601,11 @@ %%SEAHUBDIR%%/media/assets/scripts/dist/i18n/zh-tw/djangojs.js %%SEAHUBDIR%%/media/assets/scripts/dist/lib/require.ac5ad85d01a3.js %%SEAHUBDIR%%/media/assets/scripts/dist/lib/require.js -%%SEAHUBDIR%%/media/assets/scripts/dist/main.5897fed17daa.js +%%SEAHUBDIR%%/media/assets/scripts/dist/main.ab85388732be.js %%SEAHUBDIR%%/media/assets/scripts/dist/main.js %%SEAHUBDIR%%/media/assets/scripts/dist/orgadmin-main.706c264cbe87.js %%SEAHUBDIR%%/media/assets/scripts/dist/orgadmin-main.js -%%SEAHUBDIR%%/media/assets/scripts/dist/sysadmin-main.f2eb21ad4153.js +%%SEAHUBDIR%%/media/assets/scripts/dist/sysadmin-main.0595783a6bcf.js %%SEAHUBDIR%%/media/assets/scripts/dist/sysadmin-main.js %%SEAHUBDIR%%/media/assets/scripts/file-tree.ef19875b8f54.js %%SEAHUBDIR%%/media/assets/scripts/file-tree.js |