2016-07-26 10:47:45 +08:00
|
|
|
# Copyright (c) 2012-2016 Seafile Ltd.
|
2023-06-12 09:53:31 +08:00
|
|
|
from django.urls import include, path, re_path
|
2013-11-20 10:23:15 +11:00
|
|
|
from django.views.generic import TemplateView
|
2011-10-29 16:42:28 +08:00
|
|
|
|
2024-08-30 14:36:52 +08:00
|
|
|
from seahub.ai.apis import ImageCaption, GenerateSummary
|
2024-07-19 18:12:35 +08:00
|
|
|
from seahub.api2.endpoints.share_link_auth import ShareLinkUserAuthView, ShareLinkEmailAuthView
|
2024-09-06 15:15:41 +08:00
|
|
|
from seahub.api2.endpoints.internal_api import InternalUserListView, InternalCheckShareLinkAccess, \
|
|
|
|
InternalCheckFileOperationAccess
|
2024-10-15 13:52:23 +08:00
|
|
|
from seahub.auth.views import multi_adfs_sso, login_simple_check
|
2012-09-12 17:11:27 +08:00
|
|
|
from seahub.views import *
|
2023-11-30 10:37:04 +08:00
|
|
|
from seahub.views.mobile import mobile_login
|
2017-08-03 13:07:22 +08:00
|
|
|
from seahub.views.sysadmin import *
|
|
|
|
from seahub.views.ajax import *
|
|
|
|
from seahub.views.sso import *
|
2023-03-15 15:40:19 +08:00
|
|
|
from seahub.views.sso_to_thirdpart import sso_to_thirdpart
|
2017-08-03 13:07:22 +08:00
|
|
|
|
2018-04-27 03:45:44 -05:00
|
|
|
from seahub.views.file import view_history_file, view_trash_file,\
|
2019-11-21 16:14:35 +08:00
|
|
|
view_snapshot_file, view_shared_file, view_file_via_shared_dir,\
|
2018-09-14 12:05:46 +08:00
|
|
|
text_diff, view_raw_file, download_file, view_lib_file, \
|
2024-08-30 07:01:52 +08:00
|
|
|
view_lib_file_via_smart_link, view_media_file_via_share_link, \
|
2023-07-24 10:47:12 +08:00
|
|
|
view_media_file_via_public_wiki, view_sdoc_revision
|
2019-06-15 15:11:35 +08:00
|
|
|
from seahub.views.repo import repo_history_view, repo_snapshot, view_shared_dir, \
|
2018-09-12 10:32:31 +08:00
|
|
|
view_shared_upload_link, view_lib_as_wiki
|
2020-03-19 20:15:26 +08:00
|
|
|
|
|
|
|
from seahub.dingtalk.views import dingtalk_login, dingtalk_callback, \
|
|
|
|
dingtalk_connect, dingtalk_connect_callback, dingtalk_disconnect
|
|
|
|
|
2020-11-16 10:45:19 +08:00
|
|
|
from seahub.api2.endpoints.search_file import SearchFile
|
|
|
|
|
2024-08-24 23:08:18 +08:00
|
|
|
from seahub.api2.endpoints.smart_link import SmartLink, SmartLinkToken
|
2015-12-15 14:38:25 +08:00
|
|
|
from seahub.api2.endpoints.groups import Groups, Group
|
2018-06-15 17:14:40 +08:00
|
|
|
from seahub.api2.endpoints.all_groups import AllGroups
|
2019-05-09 22:09:22 +08:00
|
|
|
from seahub.api2.endpoints.departments import Departments
|
2018-01-17 18:22:48 +08:00
|
|
|
from seahub.api2.endpoints.shareable_groups import ShareableGroups
|
2017-11-03 12:04:07 +08:00
|
|
|
from seahub.api2.endpoints.group_libraries import GroupLibraries, GroupLibrary
|
2018-05-17 20:48:03 -07:00
|
|
|
|
2018-04-25 03:37:35 -05:00
|
|
|
from seahub.api2.endpoints.group_owned_libraries import GroupOwnedLibraries, \
|
2018-05-17 20:48:03 -07:00
|
|
|
GroupOwnedLibrary, GroupOwnedLibraryUserFolderPermission, \
|
2018-06-15 17:14:40 +08:00
|
|
|
GroupOwnedLibraryGroupFolderPermission, GroupOwnedLibraryUserShare, \
|
2018-09-21 15:42:59 +08:00
|
|
|
GroupOwnedLibraryGroupShare, GroupOwnedLibraryUserShareInLibrary
|
2018-05-17 20:48:03 -07:00
|
|
|
from seahub.api2.endpoints.address_book.groups import AddressBookGroupsSubGroups
|
|
|
|
from seahub.api2.endpoints.address_book.members import AddressBookGroupsSearchMember
|
|
|
|
|
2021-10-14 14:55:23 +08:00
|
|
|
from seahub.api2.endpoints.group_members import GroupMembers, GroupSearchMember, GroupMember, \
|
2021-02-10 09:59:32 +08:00
|
|
|
GroupMembersBulk, GroupMembersImport, GroupMembersImportExample
|
2016-08-03 18:17:24 +08:00
|
|
|
from seahub.api2.endpoints.search_group import SearchGroup
|
2018-11-05 10:24:00 +08:00
|
|
|
from seahub.api2.endpoints.share_links import ShareLinks, ShareLink, \
|
2021-04-19 16:01:33 +08:00
|
|
|
ShareLinkOnlineOfficeLock, ShareLinkDirents, ShareLinkSaveFileToRepo, \
|
2022-03-10 12:09:31 +08:00
|
|
|
ShareLinkUpload, ShareLinkUploadDone, ShareLinkSaveItemsToRepo, \
|
2023-04-04 16:12:53 +08:00
|
|
|
ShareLinkRepoTags, ShareLinkRepoTagsTaggedFiles, \
|
|
|
|
ShareLinksCleanInvalid
|
|
|
|
from seahub.api2.endpoints.multi_share_links import MultiShareLinks, \
|
|
|
|
MultiShareLinksBatch
|
2023-08-24 10:18:40 +08:00
|
|
|
from seahub.api2.endpoints.repo_folder_share_info import RepoFolderShareInfo
|
2016-06-30 15:06:43 +08:00
|
|
|
from seahub.api2.endpoints.shared_folders import SharedFolders
|
|
|
|
from seahub.api2.endpoints.shared_repos import SharedRepos, SharedRepo
|
2018-02-08 14:06:02 +08:00
|
|
|
from seahub.api2.endpoints.upload_links import UploadLinks, UploadLink, \
|
2023-03-17 09:44:20 +08:00
|
|
|
UploadLinkUpload, UploadLinksCleanInvalid
|
2017-08-03 13:07:22 +08:00
|
|
|
from seahub.api2.endpoints.repos_batch import ReposBatchView, \
|
2018-05-28 16:09:56 +08:00
|
|
|
ReposBatchCopyDirView, ReposBatchCreateDirView, \
|
2019-06-10 15:02:34 +08:00
|
|
|
ReposBatchCopyItemView, ReposBatchMoveItemView, \
|
2019-06-11 15:32:39 +08:00
|
|
|
ReposAsyncBatchCopyItemView, ReposAsyncBatchMoveItemView, \
|
2019-06-20 18:30:59 +08:00
|
|
|
ReposSyncBatchCopyItemView, ReposSyncBatchMoveItemView, \
|
2024-09-18 11:15:34 +08:00
|
|
|
ReposBatchDeleteItemView, RepoFoldersItemBatchDelete
|
2024-09-03 10:31:42 +08:00
|
|
|
from seahub.api2.endpoints.repos import RepoView, ReposView, RepoShareInfoView, RepoImageRotateView
|
2016-03-09 10:12:16 +08:00
|
|
|
from seahub.api2.endpoints.file import FileView
|
2024-08-30 07:01:52 +08:00
|
|
|
from seahub.api2.endpoints.file_access_log import FileAccessLogView
|
2018-09-12 17:01:48 +08:00
|
|
|
from seahub.api2.endpoints.file_history import FileHistoryView, NewFileHistoryView
|
2017-07-04 14:07:26 +08:00
|
|
|
from seahub.api2.endpoints.dir import DirView, DirDetailView
|
2017-07-11 17:45:39 +08:00
|
|
|
from seahub.api2.endpoints.file_tag import FileTagView
|
|
|
|
from seahub.api2.endpoints.file_tag import FileTagsView
|
2024-07-18 13:44:41 +08:00
|
|
|
from seahub.api2.endpoints.repo_trash import RepoTrash, RepoTrashRevertDirents, RepoTrash2
|
2020-03-11 11:50:12 +08:00
|
|
|
from seahub.api2.endpoints.repo_commit import RepoCommitView
|
2019-06-03 18:25:22 +08:00
|
|
|
from seahub.api2.endpoints.repo_commit_dir import RepoCommitDirView
|
2019-06-14 15:26:13 +08:00
|
|
|
from seahub.api2.endpoints.repo_commit_revert import RepoCommitRevertView
|
2017-06-23 10:35:41 +08:00
|
|
|
from seahub.api2.endpoints.deleted_repos import DeletedRepos
|
2017-04-10 17:23:34 +08:00
|
|
|
from seahub.api2.endpoints.repo_history import RepoHistory
|
2016-03-21 15:38:22 +08:00
|
|
|
from seahub.api2.endpoints.repo_set_password import RepoSetPassword
|
2019-02-13 12:02:55 +08:00
|
|
|
from seahub.api2.endpoints.repo_send_new_password import RepoSendNewPassword
|
2017-03-27 13:58:12 +08:00
|
|
|
from seahub.api2.endpoints.zip_task import ZipTaskView
|
2016-07-04 15:31:55 +08:00
|
|
|
from seahub.api2.endpoints.share_link_zip_task import ShareLinkZipTaskView
|
|
|
|
from seahub.api2.endpoints.query_zip_progress import QueryZipProgressView
|
2018-03-21 18:16:02 +08:00
|
|
|
from seahub.api2.endpoints.cancel_zip_task import CancelZipTaskView
|
2016-08-23 17:02:32 +08:00
|
|
|
from seahub.api2.endpoints.copy_move_task import CopyMoveTaskView
|
2016-08-23 15:55:20 +08:00
|
|
|
from seahub.api2.endpoints.query_copy_move_progress import QueryCopyMoveProgressView
|
2018-06-13 11:24:43 +08:00
|
|
|
from seahub.api2.endpoints.move_folder_merge import MoveFolderMergeView
|
2017-12-19 12:05:51 +08:00
|
|
|
from seahub.api2.endpoints.invitations import InvitationsView, InvitationsBatchView
|
2019-08-05 20:46:59 +08:00
|
|
|
from seahub.api2.endpoints.invitation import InvitationView, InvitationRevokeView
|
2019-11-18 17:55:17 +08:00
|
|
|
from seahub.api2.endpoints.repo_share_invitations import RepoShareInvitationsView, RepoShareInvitationsBatchView
|
|
|
|
from seahub.api2.endpoints.repo_share_invitation import RepoShareInvitationView
|
2016-08-19 15:17:46 +08:00
|
|
|
from seahub.api2.endpoints.notifications import NotificationsView, NotificationView
|
2016-08-31 14:34:08 +08:00
|
|
|
from seahub.api2.endpoints.repo_file_uploaded_bytes import RepoFileUploadedBytesView
|
2017-05-13 16:16:34 +08:00
|
|
|
from seahub.api2.endpoints.user_avatar import UserAvatarView
|
2024-05-15 11:57:30 +08:00
|
|
|
from seahub.api2.endpoints.wikis import WikisView, WikiView
|
2018-09-15 16:14:17 +08:00
|
|
|
from seahub.api2.endpoints.drafts import DraftsView, DraftView
|
2019-03-01 16:49:35 +08:00
|
|
|
from seahub.api2.endpoints.draft_reviewer import DraftReviewerView
|
|
|
|
from seahub.api2.endpoints.repo_draft_info import RepoDraftInfo, RepoDraftCounts
|
2018-06-14 15:41:10 +08:00
|
|
|
from seahub.api2.endpoints.activities import ActivitiesView
|
2019-11-22 15:41:21 +08:00
|
|
|
from seahub.api2.endpoints.wiki_pages import WikiPagesDirView, WikiPageContentView
|
2018-03-20 10:45:42 +08:00
|
|
|
from seahub.api2.endpoints.revision_tag import TaggedItemsView, TagNamesView
|
2024-08-05 12:10:36 +08:00
|
|
|
from seahub.api2.endpoints.user import User, UserConvertToTeamView, ResetPasswordView
|
2020-09-29 11:52:28 +08:00
|
|
|
from seahub.api2.endpoints.auth_token_by_session import AuthTokenBySession
|
2018-10-17 16:29:58 +08:00
|
|
|
from seahub.api2.endpoints.repo_tags import RepoTagsView, RepoTagView
|
2018-11-02 17:51:04 +08:00
|
|
|
from seahub.api2.endpoints.file_tag import RepoFileTagsView, RepoFileTagView
|
2018-11-16 14:56:44 +08:00
|
|
|
from seahub.api2.endpoints.tag_filter_file import TaggedFilesView
|
2018-11-24 10:12:24 +08:00
|
|
|
from seahub.api2.endpoints.related_files import RelatedFilesView, RelatedFileView
|
2018-11-22 16:46:03 +08:00
|
|
|
from seahub.api2.endpoints.webdav_secret import WebdavSecretView
|
2019-02-18 20:26:55 +08:00
|
|
|
from seahub.api2.endpoints.starred_items import StarredItems
|
2023-01-16 17:56:05 +08:00
|
|
|
from seahub.api2.endpoints.monitored_repos import MonitoredRepos, MonitoredRepo
|
2019-02-22 17:54:39 +08:00
|
|
|
from seahub.api2.endpoints.markdown_lint import MarkdownLintView
|
2019-07-08 18:04:56 +08:00
|
|
|
from seahub.api2.endpoints.public_repos_search import PublishedRepoSearchView
|
2019-08-12 16:08:18 +08:00
|
|
|
from seahub.api2.endpoints.recent_added_files import RecentAddedFilesView
|
2024-08-02 12:23:38 +08:00
|
|
|
from seahub.api2.endpoints.repo_api_tokens import RepoAPITokensView, RepoAPITokenView, RepoNotificationJwtTokenView
|
2019-11-19 17:00:45 +08:00
|
|
|
from seahub.api2.endpoints.via_repo_token import ViaRepoDirView, ViaRepoUploadLinkView, RepoInfoView, \
|
2024-09-09 16:45:22 +08:00
|
|
|
ViaRepoDownloadLinkView, ViaRepoBatchMove, ViaRepoBatchCopy, ViaRepoBatchDelete, ViaRepoTokenFile, \
|
|
|
|
ViaRepoMoveDir, ViaRepoShareLink
|
2019-11-05 17:46:06 +08:00
|
|
|
from seahub.api2.endpoints.abuse_reports import AbuseReportsView
|
2020-09-24 10:57:45 +08:00
|
|
|
from seahub.api2.endpoints.ocm import OCMProtocolView, OCMSharesView, OCMNotificationsView, \
|
|
|
|
OCMSharesPrepareView, OCMSharePrepareView, OCMSharesReceivedView, OCMShareReceivedView
|
|
|
|
from seahub.api2.endpoints.ocm_repos import OCMReposDirView, OCMReposDownloadLinkView, \
|
|
|
|
OCMReposUploadLinkView
|
2021-09-13 10:37:07 +08:00
|
|
|
from seahub.api2.endpoints.custom_share_permissions import CustomSharePermissionsView, CustomSharePermissionView
|
2017-06-21 14:48:48 +08:00
|
|
|
|
2021-09-27 17:44:23 +08:00
|
|
|
from seahub.ocm_via_webdav.ocm_api import OCMProviderView
|
|
|
|
|
2020-03-09 16:30:27 +08:00
|
|
|
from seahub.api2.endpoints.repo_share_links import RepoShareLinks, RepoShareLink
|
|
|
|
from seahub.api2.endpoints.repo_upload_links import RepoUploadLinks, RepoUploadLink
|
|
|
|
|
2017-06-21 14:48:48 +08:00
|
|
|
# Admin
|
2024-09-02 18:07:40 +08:00
|
|
|
from seahub.api2.endpoints.admin.logs_export import SysLogsExport, sys_log_export_excel
|
2019-11-05 17:46:06 +08:00
|
|
|
from seahub.api2.endpoints.admin.abuse_reports import AdminAbuseReportsView, AdminAbuseReportView
|
2017-07-03 11:51:52 +08:00
|
|
|
from seahub.api2.endpoints.admin.revision_tag import AdminTaggedItemsView
|
2017-09-09 15:27:04 +08:00
|
|
|
from seahub.api2.endpoints.admin.login_logs import LoginLogs, AdminLoginLogs
|
2016-04-12 17:37:16 +08:00
|
|
|
from seahub.api2.endpoints.admin.file_audit import FileAudit
|
|
|
|
from seahub.api2.endpoints.admin.file_update import FileUpdate
|
|
|
|
from seahub.api2.endpoints.admin.perm_audit import PermAudit
|
2016-03-16 16:21:53 +08:00
|
|
|
from seahub.api2.endpoints.admin.sysinfo import SysInfo
|
2021-10-13 15:11:51 +08:00
|
|
|
from seahub.api2.endpoints.admin.generate_user_auth_token import AdminGenerateUserAuthToken
|
2019-09-03 17:02:46 +08:00
|
|
|
from seahub.api2.endpoints.admin.web_settings import AdminWebSettings
|
2018-09-12 17:41:59 +08:00
|
|
|
from seahub.api2.endpoints.admin.statistics import (
|
2018-09-27 15:30:33 +08:00
|
|
|
FileOperationsView, TotalStorageView, ActiveUsersView, SystemTrafficView, \
|
2019-11-07 13:06:46 +08:00
|
|
|
SystemUserTrafficExcelView, SystemUserStorageExcelView, SystemUserTrafficView, \
|
|
|
|
SystemOrgTrafficView
|
2018-09-12 17:41:59 +08:00
|
|
|
)
|
2016-04-23 18:07:09 +08:00
|
|
|
from seahub.api2.endpoints.admin.devices import AdminDevices
|
|
|
|
from seahub.api2.endpoints.admin.device_errors import AdminDeviceErrors
|
2019-10-15 16:05:51 +08:00
|
|
|
from seahub.api2.endpoints.admin.users import AdminUsers, AdminUser, AdminUserResetPassword, AdminAdminUsers, \
|
2019-10-18 11:15:00 +08:00
|
|
|
AdminUserGroups, AdminUserShareLinks, AdminUserUploadLinks, AdminUserBeSharedRepos, \
|
2024-06-12 17:33:07 +08:00
|
|
|
AdminLDAPUsers, AdminSearchUser, AdminUpdateUserCcnetEmail, AdminUserList, AdminUserConvertToTeamView
|
2017-09-18 14:21:11 +08:00
|
|
|
from seahub.api2.endpoints.admin.device_trusted_ip import AdminDeviceTrustedIP
|
2019-11-18 20:36:58 +08:00
|
|
|
from seahub.api2.endpoints.admin.libraries import AdminLibraries, AdminLibrary, \
|
|
|
|
AdminSearchLibrary
|
2016-05-25 10:45:22 +08:00
|
|
|
from seahub.api2.endpoints.admin.library_dirents import AdminLibraryDirents, AdminLibraryDirent
|
2017-07-03 14:42:12 +08:00
|
|
|
from seahub.api2.endpoints.admin.system_library import AdminSystemLibrary, \
|
|
|
|
AdminSystemLibraryUploadLink
|
2017-02-17 11:46:37 +08:00
|
|
|
from seahub.api2.endpoints.admin.default_library import AdminDefaultLibrary
|
2016-05-25 10:45:22 +08:00
|
|
|
from seahub.api2.endpoints.admin.trash_libraries import AdminTrashLibraries, AdminTrashLibrary
|
2024-07-27 11:21:59 +08:00
|
|
|
from seahub.api2.endpoints.admin.groups import AdminGroups, AdminGroup, AdminSearchGroup, \
|
|
|
|
AdminDepartments, AdminGroupToDeptView
|
2017-02-09 14:59:49 +08:00
|
|
|
from seahub.api2.endpoints.admin.group_libraries import AdminGroupLibraries, AdminGroupLibrary
|
|
|
|
from seahub.api2.endpoints.admin.group_members import AdminGroupMembers, AdminGroupMember
|
2016-08-16 10:19:56 +08:00
|
|
|
from seahub.api2.endpoints.admin.shares import AdminShares
|
2019-10-15 18:21:09 +08:00
|
|
|
from seahub.api2.endpoints.admin.share_links import AdminShareLinks, AdminShareLink, \
|
2017-06-21 14:48:48 +08:00
|
|
|
AdminShareLinkDownload, AdminShareLinkCheckPassword, \
|
|
|
|
AdminShareLinkDirents
|
2019-10-15 18:21:09 +08:00
|
|
|
from seahub.api2.endpoints.admin.upload_links import AdminUploadLinks, AdminUploadLink, \
|
2017-06-21 14:48:48 +08:00
|
|
|
AdminUploadLinkUpload, AdminUploadLinkCheckPassword
|
2019-10-28 17:49:24 +08:00
|
|
|
from seahub.api2.endpoints.admin.users_batch import AdminUsersBatch, AdminAdminUsersBatch, \
|
|
|
|
AdminImportUsers
|
2017-09-09 15:27:04 +08:00
|
|
|
from seahub.api2.endpoints.admin.operation_logs import AdminOperationLogs
|
2019-11-15 11:23:09 +08:00
|
|
|
from seahub.api2.endpoints.admin.organizations import AdminOrganizations, \
|
2024-05-17 11:14:55 +08:00
|
|
|
AdminOrganization, AdminSearchOrganization, AdminOrganizationsBaseInfo
|
2019-11-02 13:16:49 +08:00
|
|
|
from seahub.api2.endpoints.admin.institutions import AdminInstitutions, AdminInstitution
|
|
|
|
from seahub.api2.endpoints.admin.institution_users import AdminInstitutionUsers, AdminInstitutionUser
|
2017-03-09 16:42:06 +08:00
|
|
|
from seahub.api2.endpoints.admin.org_users import AdminOrgUsers, AdminOrgUser
|
2019-10-16 14:06:38 +08:00
|
|
|
from seahub.api2.endpoints.admin.org_groups import AdminOrgGroups
|
|
|
|
from seahub.api2.endpoints.admin.org_repos import AdminOrgRepos
|
2018-09-12 17:41:59 +08:00
|
|
|
from seahub.api2.endpoints.admin.org_stats import AdminOrgStatsTraffic
|
2017-05-17 16:59:38 +08:00
|
|
|
from seahub.api2.endpoints.admin.logo import AdminLogo
|
|
|
|
from seahub.api2.endpoints.admin.favicon import AdminFavicon
|
2017-06-28 14:15:24 +08:00
|
|
|
from seahub.api2.endpoints.admin.license import AdminLicense
|
2019-10-24 11:30:12 +08:00
|
|
|
from seahub.api2.endpoints.admin.invitations import AdminInvitations, AdminInvitation
|
2017-08-01 10:13:13 +08:00
|
|
|
from seahub.api2.endpoints.admin.library_history import AdminLibraryHistoryLimit
|
2017-08-25 11:50:50 +08:00
|
|
|
from seahub.api2.endpoints.admin.login_bg_image import AdminLoginBgImage
|
2017-09-09 15:27:04 +08:00
|
|
|
from seahub.api2.endpoints.admin.admin_role import AdminAdminRole
|
2018-04-25 03:37:35 -05:00
|
|
|
from seahub.api2.endpoints.admin.address_book.groups import AdminAddressBookGroups, \
|
|
|
|
AdminAddressBookGroup
|
|
|
|
from seahub.api2.endpoints.admin.group_owned_libraries import AdminGroupOwnedLibraries, \
|
2018-05-17 20:48:03 -07:00
|
|
|
AdminGroupOwnedLibrary
|
2019-05-21 18:45:21 +08:00
|
|
|
from seahub.api2.endpoints.admin.user_activities import UserActivitiesView
|
2019-03-13 16:50:30 +08:00
|
|
|
from seahub.api2.endpoints.admin.file_scan_records import AdminFileScanRecords
|
2019-05-28 11:44:19 +08:00
|
|
|
from seahub.api2.endpoints.admin.notifications import AdminNotificationsView
|
2019-10-11 17:01:37 +08:00
|
|
|
from seahub.api2.endpoints.admin.sys_notifications import AdminSysNotificationsView, AdminSysNotificationView
|
2019-10-22 11:59:48 +08:00
|
|
|
from seahub.api2.endpoints.admin.logs import AdminLogsLoginLogs, AdminLogsFileAccessLogs, AdminLogsFileUpdateLogs, \
|
|
|
|
AdminLogsSharePermissionLogs
|
2019-11-07 13:32:46 +08:00
|
|
|
from seahub.api2.endpoints.admin.terms_and_conditions import AdminTermsAndConditions, AdminTermAndCondition
|
2019-05-28 11:44:19 +08:00
|
|
|
from seahub.api2.endpoints.admin.work_weixin import AdminWorkWeixinDepartments, \
|
2019-07-16 15:16:22 +08:00
|
|
|
AdminWorkWeixinDepartmentMembers, AdminWorkWeixinUsersBatch, AdminWorkWeixinDepartmentsImport
|
2020-03-19 20:15:26 +08:00
|
|
|
from seahub.api2.endpoints.admin.dingtalk import AdminDingtalkDepartments, \
|
|
|
|
AdminDingtalkDepartmentMembers, AdminDingtalkUsersBatch, \
|
|
|
|
AdminDingtalkDepartmentsImport
|
2020-07-09 14:15:17 +08:00
|
|
|
from seahub.api2.endpoints.admin.virus_scan_records import AdminVirusFilesView, AdminVirusFileView, \
|
|
|
|
AdminVirusFilesBatchView
|
2019-07-04 16:16:07 +08:00
|
|
|
from seahub.api2.endpoints.file_participants import FileParticipantsView, FileParticipantView
|
2019-07-23 20:55:17 +08:00
|
|
|
from seahub.api2.endpoints.repo_related_users import RepoRelatedUsersView
|
2020-09-07 12:03:05 +08:00
|
|
|
from seahub.api2.endpoints.repo_auto_delete import RepoAutoDeleteView
|
2023-12-26 17:50:06 +08:00
|
|
|
from seahub.seadoc.views import sdoc_revision, sdoc_revisions, sdoc_to_docx
|
2020-09-24 10:57:45 +08:00
|
|
|
from seahub.ocm.settings import OCM_ENDPOINT
|
2024-09-12 14:32:00 +08:00
|
|
|
from seahub.wiki2.views import wiki_view, wiki_publish_view
|
2024-08-16 10:17:54 +08:00
|
|
|
from seahub.api2.endpoints.wiki2 import Wikis2View, Wiki2View, Wiki2ConfigView, Wiki2PagesView, Wiki2PageView, \
|
2024-09-12 14:32:00 +08:00
|
|
|
Wiki2DuplicatePageView, WikiPageTrashView, Wiki2PublishView, Wiki2PublishConfigView, Wiki2PublishPageView
|
2024-05-17 11:14:55 +08:00
|
|
|
from seahub.api2.endpoints.subscription import SubscriptionView, SubscriptionPlansView, SubscriptionLogsView
|
2024-07-22 09:45:08 +08:00
|
|
|
from seahub.api2.endpoints.metadata_manage import MetadataRecords, MetadataManage, MetadataColumns, MetadataRecordInfo, \
|
2024-10-16 11:09:30 +08:00
|
|
|
MetadataViews, MetadataViewsMoveView, MetadataViewsDetailView, MetadataViewsDuplicateView, FacesRecords, \
|
|
|
|
FaceRecognitionManage, FacesRecord
|
2024-06-29 17:58:27 +08:00
|
|
|
from seahub.api2.endpoints.user_list import UserListView
|
2024-09-02 18:07:40 +08:00
|
|
|
from seahub.api2.endpoints.seahub_io import SeahubIOStatus
|
2024-06-07 17:42:27 +08:00
|
|
|
|
2023-10-13 16:09:06 +08:00
|
|
|
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns = [
|
2023-06-12 09:53:31 +08:00
|
|
|
path('accounts/', include('seahub.base.registration_urls')),
|
2023-11-30 10:37:04 +08:00
|
|
|
path('mobile-login/', mobile_login, name="mobile_login"),
|
2011-03-19 13:15:02 +08:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
path('sso/', sso, name='sso'),
|
2024-03-22 21:36:48 +08:00
|
|
|
path('work-weixin-sso/', work_weixin_sso, name='work_weixin_sso'),
|
|
|
|
path('dingtalk-sso/', dingtalk_sso, name='dingtalk_sso'),
|
2023-06-12 09:53:31 +08:00
|
|
|
path('jwt-sso/', jwt_sso, name='jwt_sso'),
|
|
|
|
re_path(r'^shib-login/', shib_login, name="shib_login"),
|
|
|
|
path('oauth/', include('seahub.oauth.urls')),
|
|
|
|
path('thirdparty-editor/', include('seahub.thirdparty_editor.urls')),
|
|
|
|
path('ocm-via-webdav/', include('seahub.ocm_via_webdav.urls')),
|
|
|
|
path('cad/', include('seahub.cad.urls')),
|
2017-11-14 11:53:41 +08:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
path('sso-to-thirdpart/', sso_to_thirdpart, name='sso-to-thirdpart'),
|
2023-03-15 15:40:19 +08:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
path('', react_fake_view, name='libraries'),
|
|
|
|
re_path(r'^robots\.txt$', TemplateView.as_view(template_name='robots.txt', content_type='text/plain')),
|
2013-04-06 19:09:33 +08:00
|
|
|
|
2016-09-13 11:16:12 +08:00
|
|
|
# revert repo
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^repo/history/revert/(?P<repo_id>[-0-9a-f]{36})/$', repo_revert_history, name='repo_revert_history'),
|
|
|
|
|
|
|
|
path('repo/upload_check/', validate_filename),
|
|
|
|
re_path(r'^repo/download_dir/(?P<repo_id>[-0-9a-f]{36})/$', repo_download_dir, name='repo_download_dir'),
|
|
|
|
re_path(r'^repo/file_revisions/(?P<repo_id>[-0-9a-f]{36})/$', file_revisions, name='file_revisions'),
|
2023-07-06 14:56:31 +08:00
|
|
|
re_path(r'^repo/sdoc_revision/(?P<repo_id>[-0-9a-f]{36})/$', sdoc_revision, name='sdoc_revision'),
|
2023-07-07 16:07:14 +08:00
|
|
|
re_path(r'^repo/sdoc_revisions/(?P<repo_id>[-0-9a-f]{36})/$', sdoc_revisions, name='sdoc_revisions'),
|
2023-12-26 17:50:06 +08:00
|
|
|
re_path(r'^repo/sdoc_export_to_docx/(?P<repo_id>[-0-9a-f]{36})/$', sdoc_to_docx, name='sdoc_export_to_docx'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^repo/text_diff/(?P<repo_id>[-0-9a-f]{36})/$', text_diff, name='text_diff'),
|
|
|
|
re_path(r'^repo/history/(?P<repo_id>[-0-9a-f]{36})/$', repo_history, name='repo_history'),
|
|
|
|
re_path(r'^repo/history/view/(?P<repo_id>[-0-9a-f]{36})/$', repo_history_view, name='repo_history_view'),
|
|
|
|
re_path(r'^repo/(?P<repo_id>[-0-9a-f]{36})/snapshot/$', repo_snapshot, name="repo_snapshot"),
|
|
|
|
re_path(r'^repo/(?P<repo_id>[-0-9a-f]{36})/trash/$', repo_folder_trash, name="repo_folder_trash"),
|
|
|
|
re_path(r'^repo/(?P<repo_id>[-0-9a-f]{36})/raw/(?P<file_path>.*)$', view_raw_file, name="view_raw_file"),
|
|
|
|
re_path(r'^repo/(?P<repo_id>[-0-9a-f]{36})/history/files/$', view_history_file, name="view_history_file"),
|
|
|
|
re_path(r'^repo/(?P<repo_id>[-0-9a-f]{36})/trash/files/$', view_trash_file, name="view_trash_file"),
|
|
|
|
re_path(r'^repo/(?P<repo_id>[-0-9a-f]{36})/snapshot/files/$', view_snapshot_file, name="view_snapshot_file"),
|
|
|
|
re_path(r'^repo/(?P<repo_id>[-0-9a-f]{36})/(?P<obj_id>[0-9a-f]{40})/download/$', download_file, name='download_file'),
|
2012-07-23 22:44:09 +08:00
|
|
|
|
2015-01-25 18:47:42 +08:00
|
|
|
### lib (replace the old `repo` urls) ###
|
|
|
|
# url(r'^lib/(?P<repo_id>[-0-9a-f]{36})/dir/(?P<path>.*)$', view_lib_dir, name='view_lib_dir'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^lib/(?P<repo_id>[-0-9a-f]{36})/file(?P<path>.*)$', view_lib_file, name='view_lib_file'),
|
2023-07-24 10:47:12 +08:00
|
|
|
re_path(r'^lib/(?P<repo_id>[-0-9a-f]{36})/revisions/(?P<revision_id>\d+)/$', view_sdoc_revision, name='view_sdoc_revision'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^wiki/lib/(?P<repo_id>[-0-9a-f]{36})/(?P<path>.*)$', view_lib_as_wiki, name='view_lib_as_wiki'),
|
|
|
|
re_path(r'^smart-link/(?P<dirent_uuid>[-0-9a-f]{36})/(?P<dirent_name>.*)$', view_lib_file_via_smart_link, name="view_lib_file_via_smart_link"),
|
2015-01-25 18:47:42 +08:00
|
|
|
|
2016-03-30 15:02:31 +08:00
|
|
|
### share/upload link ###
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^f/(?P<token>[a-f0-9]+)/$', view_shared_file, name='view_shared_file'),
|
|
|
|
re_path(r'^d/(?P<token>[a-f0-9]+)/$', view_shared_dir, name='view_shared_dir'),
|
|
|
|
re_path(r'^d/(?P<token>[a-f0-9]+)/files/$', view_file_via_shared_dir, name='view_file_via_shared_dir'),
|
|
|
|
re_path(r'^u/d/(?P<token>[a-f0-9]+)/$', view_shared_upload_link, name='view_shared_upload_link'),
|
|
|
|
path('view-image-via-share-link/', view_media_file_via_share_link, name='view_media_file_via_share_link'),
|
2013-07-27 14:02:21 +08:00
|
|
|
|
2020-03-19 20:15:26 +08:00
|
|
|
|
|
|
|
# dingtalk
|
2023-06-12 09:53:31 +08:00
|
|
|
path('dingtalk/login/', dingtalk_login, name='dingtalk_login'),
|
|
|
|
path('dingtalk/callback/', dingtalk_callback, name='dingtalk_callback'),
|
|
|
|
path('dingtalk/connect/', dingtalk_connect, name='dingtalk_connect'),
|
|
|
|
path('dingtalk/connect-callback/', dingtalk_connect_callback, name='dingtalk_connect_callback'),
|
|
|
|
path('dingtalk/disconnect/', dingtalk_disconnect, name='dingtalk_disconnect'),
|
2020-03-19 20:15:26 +08:00
|
|
|
|
2013-07-27 14:02:21 +08:00
|
|
|
### Misc ###
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^image-view/(?P<filename>.*)$', image_view, name='image_view'),
|
|
|
|
path('custom-css/', custom_css_view, name='custom_css'),
|
|
|
|
path('i18n/', i18n, name='i18n'),
|
|
|
|
path('convert_cmmt_desc_link/', convert_cmmt_desc_link, name='convert_cmmt_desc_link'),
|
|
|
|
path('download_client_program/', TemplateView.as_view(template_name="download.html"), name="download_client"),
|
|
|
|
path('choose_register/', choose_register, name="choose_register"),
|
2018-10-08 15:33:40 +08:00
|
|
|
|
|
|
|
### React ###
|
2023-06-12 09:53:31 +08:00
|
|
|
path('dashboard/', react_fake_view, name="dashboard"),
|
2023-11-09 12:25:22 +08:00
|
|
|
path('my-activities/', react_fake_view, name="my_activities"),
|
2023-06-12 09:53:31 +08:00
|
|
|
path('starred/', react_fake_view, name="starred"),
|
|
|
|
path('linked-devices/', react_fake_view, name="linked_devices"),
|
|
|
|
path('share-admin-libs/', react_fake_view, name="share_admin_libs"),
|
|
|
|
path('share-admin-folders/', react_fake_view, name="share_admin_folders"),
|
|
|
|
path('share-admin-share-links/', react_fake_view, name="share_admin_share_links"),
|
|
|
|
path('share-admin-upload-links/', react_fake_view, name="share_admin_upload_links"),
|
|
|
|
path('shared-libs/', react_fake_view, name="shared_libs"),
|
|
|
|
path('shared-with-ocm/', react_fake_view, name="shared_with_ocm"),
|
2024-04-19 14:51:41 +08:00
|
|
|
path('libraries/', react_fake_view, name="libs"),
|
2023-06-12 09:53:31 +08:00
|
|
|
path('my-libs/', react_fake_view, name="my_libs"),
|
|
|
|
path('groups/', react_fake_view, name="groups"),
|
|
|
|
path('group/<int:group_id>/', react_fake_view, name="group"),
|
|
|
|
re_path(r'^library/(?P<repo_id>[-0-9a-f]{36})/$', react_fake_view, name="library_view"),
|
|
|
|
re_path(r'^library/(?P<repo_id>[-0-9a-f]{36})/(?P<repo_name>[^/]+)/(?P<path>.*)$', react_fake_view, name="lib_view"),
|
|
|
|
re_path(r'^remote-library/(?P<provider_id>[-0-9a-f]{36})/(?P<repo_id>[-0-9a-f]{36})/(?P<repo_name>[^/]+)/(?P<path>.*)$', react_fake_view, name="remote_lib_view"),
|
|
|
|
path('my-libs/deleted/', react_fake_view, name="my_libs_deleted"),
|
|
|
|
path('org/', react_fake_view, name="org"),
|
|
|
|
path('invitations/', react_fake_view, name="invitations"),
|
|
|
|
|
|
|
|
re_path(r'^ajax/repo/(?P<repo_id>[-0-9a-f]{36})/history/changes/$', repo_history_changes, name='repo_history_changes'),
|
|
|
|
re_path(r'^ajax/u/d/(?P<token>[-0-9a-f]+)/upload/$', get_file_upload_url_ul, name='get_file_upload_url_ul'),
|
|
|
|
path('ajax/upload-file-done/', upload_file_done, name='upload_file_done'),
|
|
|
|
|
|
|
|
re_path(r'^_templates/(?P<template>.*)$', underscore_template, name="underscore_template"),
|
2015-01-20 18:25:10 +08:00
|
|
|
|
2015-01-25 18:47:42 +08:00
|
|
|
## ajax lib
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^ajax/lib/(?P<repo_id>[-0-9a-f]{36})/dir/$', list_lib_dir, name="list_lib_dir"),
|
2015-01-20 18:25:10 +08:00
|
|
|
|
2012-11-06 11:12:49 +08:00
|
|
|
### Apps ###
|
2023-06-12 09:53:31 +08:00
|
|
|
path('api2/', include('seahub.api2.urls')),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
2017-08-12 15:10:08 +08:00
|
|
|
## user
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/user/$', User.as_view(), name="api-v2.1-user"),
|
2024-08-24 23:08:18 +08:00
|
|
|
|
2024-06-12 17:33:07 +08:00
|
|
|
# user:convert to team account
|
|
|
|
re_path(r'^api/v2.1/user/convert-to-team/$', UserConvertToTeamView.as_view(), name="api-v2.1-user-convert-to-team"),
|
2017-08-12 15:10:08 +08:00
|
|
|
|
2024-06-29 17:58:27 +08:00
|
|
|
# user list
|
|
|
|
re_path(r'^api/v2.1/user-list/$', UserListView.as_view(), name='api-v2.1-user-list'),
|
2024-08-24 23:08:18 +08:00
|
|
|
|
2024-08-05 12:10:36 +08:00
|
|
|
re_path(r'^api/v2.1/user/reset-password/$', ResetPasswordView.as_view(), name="api-v2.1-user-reset-password"),
|
2024-06-29 17:58:27 +08:00
|
|
|
|
2020-09-29 11:52:28 +08:00
|
|
|
## obtain auth token by login session
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/auth-token-by-session/$', AuthTokenBySession.as_view(), name="api-v2.1-auth-token-by-session"),
|
2020-09-29 11:52:28 +08:00
|
|
|
|
2018-07-11 17:36:21 +08:00
|
|
|
## user::smart-link
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/smart-link/$', SmartLink.as_view(), name="api-v2.1-smart-link"),
|
|
|
|
re_path(r'^api/v2.1/smart-links/(?P<token>[-0-9a-f]{36})/$', SmartLinkToken.as_view(), name="api-v2.1-smart-links-token"),
|
2018-07-11 17:36:21 +08:00
|
|
|
|
2020-11-16 10:45:19 +08:00
|
|
|
# search file by name
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/search-file/$', SearchFile.as_view(), name='api-v2.1-search-file'),
|
2020-11-16 10:45:19 +08:00
|
|
|
|
2019-05-09 21:26:20 +08:00
|
|
|
# departments
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'api/v2.1/departments/$', Departments.as_view(), name='api-v2.1-all-departments'),
|
2019-05-09 21:26:20 +08:00
|
|
|
|
2017-04-08 17:55:12 +08:00
|
|
|
## user::groups
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/all-groups/$', AllGroups.as_view(), name='api-v2.1-all-groups'),
|
|
|
|
re_path(r'^api/v2.1/shareable-groups/$', ShareableGroups.as_view(), name='api-v2.1-shareable-groups'),
|
|
|
|
re_path(r'^api/v2.1/groups/$', Groups.as_view(), name='api-v2.1-groups'),
|
|
|
|
re_path(r'^api/v2.1/groups/(?P<group_id>\d+)/$', Group.as_view(), name='api-v2.1-group'),
|
|
|
|
re_path(r'^api/v2.1/groups/(?P<group_id>\d+)/libraries/$', GroupLibraries.as_view(), name='api-v2.1-group-libraries'),
|
|
|
|
re_path(r'^api/v2.1/groups/(?P<group_id>\d+)/libraries/(?P<repo_id>[-0-9a-f]{36})/$', GroupLibrary.as_view(), name='api-v2.1-group-library'),
|
|
|
|
re_path(r'^api/v2.1/groups/(?P<group_id>\d+)/group-owned-libraries/$', GroupOwnedLibraries.as_view(), name='api-v2.1-group-owned-libraries'),
|
|
|
|
re_path(r'^api/v2.1/groups/(?P<group_id>\d+)/group-owned-libraries/(?P<repo_id>[-0-9a-f]{36})/$', GroupOwnedLibrary.as_view(), name='api-v2.1-owned-group-library'),
|
|
|
|
re_path(r'^api/v2.1/groups/(?P<group_id>\d+)/members/$', GroupMembers.as_view(), name='api-v2.1-group-members'),
|
|
|
|
re_path(r'^api/v2.1/groups/(?P<group_id>\d+)/search-member/$', GroupSearchMember.as_view(), name='api-v2.1-group-search-member'),
|
|
|
|
re_path(r'^api/v2.1/groups/(?P<group_id>\d+)/members/bulk/$', GroupMembersBulk.as_view(), name='api-v2.1-group-members-bulk'),
|
|
|
|
re_path(r'^api/v2.1/groups/(?P<group_id>\d+)/members/import/$', GroupMembersImport.as_view(), name='api-v2.1-group-members-import'),
|
|
|
|
re_path(r'^api/v2.1/group-members-import-example/$', GroupMembersImportExample.as_view(), name='api-v2.1-group-members-import-example'),
|
|
|
|
re_path(r'^api/v2.1/groups/(?P<group_id>\d+)/members/(?P<email>[^/]+)/$', GroupMember.as_view(), name='api-v2.1-group-member'),
|
|
|
|
re_path(r'^api/v2.1/search-group/$', SearchGroup.as_view(), name='api-v2.1-search-group'),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
2018-05-17 20:48:03 -07:00
|
|
|
## address book
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/address-book/groups/(?P<group_id>\d+)/sub-groups/$', AddressBookGroupsSubGroups.as_view(), name='api-v2.1-address-book-groups-sub-groups'),
|
|
|
|
re_path(r'^api/v2.1/address-book/groups/(?P<group_id>\d+)/search-member/$', AddressBookGroupsSearchMember.as_view(), name='api-v2.1-address-book-search-member'),
|
|
|
|
re_path(r'^api/v2.1/group-owned-libraries/(?P<repo_id>[-0-9a-f]{36})/user-folder-permission/$', GroupOwnedLibraryUserFolderPermission.as_view(), name='api-v2.1-group-owned-library-user-folder-permission'),
|
|
|
|
re_path(r'^api/v2.1/group-owned-libraries/(?P<repo_id>[-0-9a-f]{36})/group-folder-permission/$', GroupOwnedLibraryGroupFolderPermission.as_view(), name='api-v2.1-group-owned-library-group-folder-permission'),
|
|
|
|
re_path(r'^api/v2.1/group-owned-libraries/(?P<repo_id>[-0-9a-f]{36})/user-share/$', GroupOwnedLibraryUserShare.as_view(), name='api-v2.1-group-owned-library-user-share'),
|
|
|
|
re_path(r'^api/v2.1/group-owned-libraries/(?P<repo_id>[-0-9a-f]{36})/group-share/$', GroupOwnedLibraryGroupShare.as_view(), name='api-v2.1-group-owned-library-group-share'),
|
|
|
|
re_path(r'^api/v2.1/group-owned-libraries/user-share-in-libraries/(?P<repo_id>[-0-9-a-f]{36})/$', GroupOwnedLibraryUserShareInLibrary.as_view(), name='api-v2.1-group-owned-library-user-share-in-library'),
|
2018-05-17 20:48:03 -07:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/custom-share-permissions/$', CustomSharePermissionsView.as_view(), name='api-v2.1-custom-share-permissions'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/custom-share-permissions/(?P<permission_id>\d+)/$', CustomSharePermissionView.as_view(), name='api-v2.1-custom-share-permission'),
|
2021-09-13 10:37:07 +08:00
|
|
|
|
2023-08-24 10:18:40 +08:00
|
|
|
## user::shared-repos-folders
|
|
|
|
re_path(r'^api/v2.1/repo-folder-share-info/$', RepoFolderShareInfo.as_view(), name='api-v2.1-repo-folder-share-info'),
|
|
|
|
|
2017-04-08 17:55:12 +08:00
|
|
|
## user::shared-folders
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/shared-folders/$', SharedFolders.as_view(), name='api-v2.1-shared-folders'),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
|
|
|
## user::shared-repos
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/shared-repos/$', SharedRepos.as_view(), name='api-v2.1-shared-repos'),
|
|
|
|
re_path(r'^api/v2.1/shared-repos/(?P<repo_id>[-0-9a-f]{36})/$', SharedRepo.as_view(), name='api-v2.1-shared-repo'),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
2017-08-03 13:07:22 +08:00
|
|
|
## user::shared-download-links
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/share-links/$', ShareLinks.as_view(), name='api-v2.1-share-links'),
|
|
|
|
re_path(r'^api/v2.1/multi-share-links/$', MultiShareLinks.as_view(), name='api-v2.1-multi-share-links'),
|
|
|
|
re_path(r'^api/v2.1/multi-share-links/batch/$', MultiShareLinksBatch.as_view(), name='api-v2.1-multi-share-links-batch'),
|
|
|
|
re_path(r'^api/v2.1/share-links/clean-invalid/$', ShareLinksCleanInvalid.as_view(), name='api-v2.1-share-links-clean-invalid'),
|
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/$', ShareLink.as_view(), name='api-v2.1-share-link'),
|
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/save-file-to-repo/$', ShareLinkSaveFileToRepo.as_view(), name='api-v2.1-share-link-save-file-to-repo'),
|
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/save-items-to-repo/$', ShareLinkSaveItemsToRepo.as_view(), name='api-v2.1-share-link-save-items-to-repo'),
|
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/dirents/$', ShareLinkDirents.as_view(), name='api-v2.1-share-link-dirents'),
|
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/online-office-lock/$',
|
2018-11-05 10:24:00 +08:00
|
|
|
ShareLinkOnlineOfficeLock.as_view(), name='api-v2.1-share-link-online-office-lock'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/upload/$', ShareLinkUpload.as_view(), name='api-v2.1-share-link-upload'),
|
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/upload/done/$', ShareLinkUploadDone.as_view(), name='api-v2.1-share-link-upload-done'),
|
2017-08-03 13:07:22 +08:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/repo-tags/$', ShareLinkRepoTags.as_view(), name='api-v2.1-share-link-repo-tags'),
|
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/tagged-files/(?P<tag_id>\d+)/$', ShareLinkRepoTagsTaggedFiles.as_view(), name='api-v2.1-share-link-repo-tags-tagged-files'),
|
2024-07-19 18:12:35 +08:00
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/user-auth/$', ShareLinkUserAuthView.as_view(), name='api-v2.1-share-link-user-auth'),
|
|
|
|
re_path(r'^api/v2.1/share-links/(?P<token>[a-f0-9]+)/email-auth/$', ShareLinkEmailAuthView.as_view(), name='api-v2.1-share-link-user-auth'),
|
2022-03-10 12:09:31 +08:00
|
|
|
|
2017-08-03 13:07:22 +08:00
|
|
|
## user::shared-upload-links
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/upload-links/$', UploadLinks.as_view(), name='api-v2.1-upload-links'),
|
|
|
|
re_path(r'^api/v2.1/upload-links/clean-invalid/$', UploadLinksCleanInvalid.as_view(), name='api-v2.1-upload-links-clean-invalid'),
|
|
|
|
re_path(r'^api/v2.1/upload-links/(?P<token>[a-f0-9]+)/$', UploadLink.as_view(), name='api-v2.1-upload-link'),
|
|
|
|
re_path(r'^api/v2.1/upload-links/(?P<token>[a-f0-9]+)/upload/$', UploadLinkUpload.as_view(), name='api-v2.1-upload-link-upload'),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
2017-07-03 11:51:52 +08:00
|
|
|
## user::revision-tags
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/revision-tags/tagged-items/$', TaggedItemsView.as_view(), name='api-v2.1-revision-tags-tagged-items'),
|
|
|
|
re_path(r'^api/v2.1/revision-tags/tag-names/$', TagNamesView.as_view(), name='api-v2.1-revision-tags-tag-names'),
|
2017-07-03 11:51:52 +08:00
|
|
|
|
2017-08-03 13:07:22 +08:00
|
|
|
## user::repos-batch-operate
|
2019-06-20 18:30:59 +08:00
|
|
|
# for icourt
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/repos/batch/$', ReposBatchView.as_view(), name='api-v2.1-repos-batch'),
|
|
|
|
re_path(r'^api/v2.1/repos/batch-copy-dir/$', ReposBatchCopyDirView.as_view(), name='api-v2.1-repos-batch-copy-dir'),
|
|
|
|
re_path(r'^api/v2.1/repos/batch-create-dir/$', ReposBatchCreateDirView.as_view(), name='api-v2.1-repos-batch-create-dir'),
|
|
|
|
re_path(r'^api/v2.1/repos/batch-copy-item/$', ReposBatchCopyItemView.as_view(), name='api-v2.1-repos-batch-copy-item'),
|
|
|
|
re_path(r'^api/v2.1/repos/batch-move-item/$', ReposBatchMoveItemView.as_view(), name='api-v2.1-repos-batch-move-item'),
|
|
|
|
|
2024-09-18 11:15:34 +08:00
|
|
|
re_path(r'^api/v2.1/repos/batch-delete-folders-item/$', RepoFoldersItemBatchDelete.as_view(), name='api-v2.1-repos-folders-batch-delete'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/repos/batch-delete-item/$', ReposBatchDeleteItemView.as_view(), name='api-v2.1-repos-batch-delete-item'),
|
|
|
|
re_path(r'^api/v2.1/repos/async-batch-copy-item/$', ReposAsyncBatchCopyItemView.as_view(), name='api-v2.1-repos-async-batch-copy-item'),
|
|
|
|
re_path(r'^api/v2.1/repos/async-batch-move-item/$', ReposAsyncBatchMoveItemView.as_view(), name='api-v2.1-repos-async-batch-move-item'),
|
|
|
|
re_path(r'^api/v2.1/repos/sync-batch-copy-item/$', ReposSyncBatchCopyItemView.as_view(), name='api-v2.1-repos-sync-batch-copy-item'),
|
|
|
|
re_path(r'^api/v2.1/repos/sync-batch-move-item/$', ReposSyncBatchMoveItemView.as_view(), name='api-v2.1-repos-sync-batch-move-item'),
|
2017-08-03 13:07:22 +08:00
|
|
|
|
|
|
|
## user::deleted repos
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/deleted-repos/$', DeletedRepos.as_view(), name='api2-v2.1-deleted-repos'),
|
2017-08-03 13:07:22 +08:00
|
|
|
|
|
|
|
## user::repos
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/repos/$', ReposView.as_view(), name='api-v2.1-repos-view'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/$', RepoView.as_view(), name='api-v2.1-repo-view'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/file/$', FileView.as_view(), name='api-v2.1-file-view'),
|
2024-08-30 07:01:52 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/file/access-log/$', FileAccessLogView.as_view(), name='api-v2.1-file-access-log-view'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/file/history/$', FileHistoryView.as_view(), name='api-v2.1-file-history-view'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/file/new_history/$', NewFileHistoryView.as_view(), name='api-v2.1-new-file-history-view'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/dir/$', DirView.as_view(), name='api-v2.1-dir-view'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/commits/(?P<commit_id>[0-9a-f]{40})/$', RepoCommitView.as_view(), name='api-v2.1-repo-commit'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/commits/(?P<commit_id>[0-9a-f]{40})/dir/$', RepoCommitDirView.as_view(), name='api-v2.1-repo-commit-dir'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/commits/(?P<commit_id>[0-9a-f]{40})/revert/$', RepoCommitRevertView.as_view(), name='api-v2.1-repo-commit-revert'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/dir/detail/$', DirDetailView.as_view(), name='api-v2.1-dir-detail-view'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/trash/$', RepoTrash.as_view(), name='api-v2.1-repo-trash'),
|
2024-07-18 13:44:41 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/trash2/$', RepoTrash2.as_view(), name='api-v2.1-repo-trash2'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/trash/revert-dirents/$', RepoTrashRevertDirents.as_view(), name='api-v2.1-repo-trash-revert-dirents'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/history/$', RepoHistory.as_view(), name='api-v2.1-repo-history'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/set-password/$', RepoSetPassword.as_view(), name="api-v2.1-repo-set-password"),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/send-new-password/$', RepoSendNewPassword.as_view(), name="api-v2.1-repo-send-new-password"),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/repo-tags/$', RepoTagsView.as_view(), name='api-v2.1-repo-tags'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/repo-tags/(?P<repo_tag_id>\d+)/$', RepoTagView.as_view(), name='api-v2.1-repo-tag'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/file-tags/$', RepoFileTagsView.as_view(), name='api-v2.1-file-tags'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/file-tags/(?P<file_tag_id>\d+)/$', RepoFileTagView.as_view(), name='api-v2.1-file-tag'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/tagged-files/(?P<repo_tag_id>\d+)/$', TaggedFilesView.as_view(), name='api-v2.1-tagged-files'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/file/participants/$', FileParticipantsView.as_view(), name='api-v2.1-file-participants'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/file/participant/$', FileParticipantView.as_view(), name='api-v2.1-file-participant'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/related-users/$', RepoRelatedUsersView.as_view(), name='api-v2.1-related-user'),
|
|
|
|
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/auto-delete/$', RepoAutoDeleteView.as_view(), name='api-v2.1-repo-auto-delete'),
|
|
|
|
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/share-links/$', RepoShareLinks.as_view(), name='api-v2.1-repo-share-links'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/share-links/(?P<token>[a-f0-9]+)/$', RepoShareLink.as_view(), name='api-v2.1-repo-share-link'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/upload-links/$', RepoUploadLinks.as_view(), name='api-v2.1-repo-upload-links'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/upload-links/(?P<token>[a-f0-9]+)/$', RepoUploadLink.as_view(), name='api-v2.1-repo-upload-link'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/share-info/$', RepoShareInfoView.as_view(), name='api-v2.1-repo-share-info-view'),
|
2024-09-03 10:31:42 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/image-rotate/$', RepoImageRotateView.as_view(), name='api-v2.1-repo-image-rotate-view'),
|
2020-03-09 16:30:27 +08:00
|
|
|
|
2019-11-04 15:47:20 +08:00
|
|
|
## user:: repo-api-tokens
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/repo-api-tokens/$', RepoAPITokensView.as_view(), name='api-v2.1-repo-api-tokens'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/repo-api-tokens/(?P<app_name>.*)/$', RepoAPITokenView.as_view(), name='api-v2.1-repo-api-token'),
|
2024-08-24 23:08:18 +08:00
|
|
|
|
2024-08-02 12:23:38 +08:00
|
|
|
## user:: repo-jwt-tokens
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/repo-notification-jwt-token/$', RepoNotificationJwtTokenView.as_view(), name='api-v2.1-repo-jwt-token'),
|
2019-11-04 15:47:20 +08:00
|
|
|
|
|
|
|
## access repo from repo_api_tokens
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/via-repo-token/dir/$', ViaRepoDirView.as_view(), name='via-repo-dir'),
|
|
|
|
re_path(r'^api/v2.1/via-repo-token/upload-link/$', ViaRepoUploadLinkView.as_view(), name='via-upload-link'),
|
|
|
|
re_path(r'^api/v2.1/via-repo-token/download-link/$', ViaRepoDownloadLinkView.as_view(), name='via-download-link'),
|
|
|
|
re_path(r'^api/v2.1/via-repo-token/repo-info/$', RepoInfoView.as_view(), name='via-fetch-repo'),
|
2023-12-26 14:56:48 +08:00
|
|
|
re_path(r'^api/v2.1/via-repo-token/sync-batch-move-item/$', ViaRepoBatchMove.as_view(), name='via-repo-token-move'),
|
|
|
|
re_path(r'^api/v2.1/via-repo-token/sync-batch-copy-item/$', ViaRepoBatchCopy.as_view(), name='via-repo-token-copy'),
|
|
|
|
re_path(r'^api/v2.1/via-repo-token/batch-delete-item/$', ViaRepoBatchDelete.as_view(), name='via-repo-token-delete'),
|
|
|
|
re_path(r'^api/v2.1/via-repo-token/file/$', ViaRepoTokenFile.as_view(), name='via-repo-token-file'),
|
2024-09-09 16:45:22 +08:00
|
|
|
re_path(r'^api/v2.1/via-repo-token/move-dir/$', ViaRepoMoveDir.as_view(), name='via-repo-token-move-dir'),
|
|
|
|
re_path(r'^api/v2.1/via-repo-token/share-links/$', ViaRepoShareLink.as_view(), name='via-repo-token-share-links'),
|
2019-11-04 15:47:20 +08:00
|
|
|
|
2018-11-24 10:12:24 +08:00
|
|
|
# user::related-files
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/related-files/$', RelatedFilesView.as_view(), name='api-v2.1-related-files'),
|
|
|
|
re_path(r'^api/v2.1/related-files/(?P<related_id>\d+)/$', RelatedFileView.as_view(), name='api-v2.1-related-file'),
|
2018-11-24 10:12:24 +08:00
|
|
|
|
2019-02-22 17:54:39 +08:00
|
|
|
# user: markdown-lint
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/markdown-lint/$', MarkdownLintView.as_view(), name='api-v2.1-markdown-lint'),
|
2019-02-22 17:54:39 +08:00
|
|
|
|
2019-07-08 16:47:04 +08:00
|
|
|
# public repos search
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/published-repo-search/$', PublishedRepoSearchView.as_view(), name='api-v2.1-published-repo-search'),
|
2019-07-08 16:47:04 +08:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/recent-added-files/$', RecentAddedFilesView.as_view(), name='api-v2.1-recent-added-files'),
|
2019-08-12 16:08:18 +08:00
|
|
|
|
2018-11-02 17:51:04 +08:00
|
|
|
# Deprecated
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/tags/$', FileTagsView.as_view(), name="api-v2.1-filetags-view"),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/tags/(?P<name>.*?)/$', FileTagView.as_view(), name="api-v2.1-filetag-view"),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
|
|
|
## user::download-dir-zip-task
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/zip-task/$', ZipTaskView.as_view(), name='api-v2.1-zip-task'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/file-uploaded-bytes/$', RepoFileUploadedBytesView.as_view(), name='api-v2.1-repo-file-uploaded-bytes'),
|
|
|
|
re_path(r'^api/v2.1/share-link-zip-task/$', ShareLinkZipTaskView.as_view(), name='api-v2.1-share-link-zip-task'),
|
|
|
|
re_path(r'^api/v2.1/query-zip-progress/$', QueryZipProgressView.as_view(), name='api-v2.1-query-zip-progress'),
|
|
|
|
re_path(r'^api/v2.1/cancel-zip-task/$', CancelZipTaskView.as_view(), name='api-v2.1-cancel-zip-task'),
|
|
|
|
re_path(r'^api/v2.1/copy-move-task/$', CopyMoveTaskView.as_view(), name='api-v2.1-copy-move-task'),
|
|
|
|
re_path(r'^api/v2.1/query-copy-move-progress/$', QueryCopyMoveProgressView.as_view(), name='api-v2.1-query-copy-move-progress'),
|
2018-06-13 11:24:43 +08:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/move-folder-merge/$', MoveFolderMergeView.as_view(), name='api-v2.1-move-folder-merge'),
|
2018-06-13 11:24:43 +08:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/notifications/$', NotificationsView.as_view(), name='api-v2.1-notifications'),
|
|
|
|
re_path(r'^api/v2.1/notification/$', NotificationView.as_view(), name='api-v2.1-notification'),
|
2016-08-19 12:00:05 +08:00
|
|
|
|
2017-04-08 17:55:12 +08:00
|
|
|
## user::invitations
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/invitations/$', InvitationsView.as_view()),
|
|
|
|
re_path(r'^api/v2.1/invitations/batch/$', InvitationsBatchView.as_view()),
|
|
|
|
re_path(r'^api/v2.1/invitations/(?P<token>[a-f0-9]{32})/$', InvitationView.as_view()),
|
|
|
|
re_path(r'^api/v2.1/invitations/(?P<token>[a-f0-9]{32})/revoke/$', InvitationRevokeView.as_view()),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/shared/invitations/$', RepoShareInvitationsView.as_view(), name="api-v2.1-repo-share-invitations"),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/shared/invitations/batch/$', RepoShareInvitationsBatchView.as_view(), name="api-v2.1-repo-share-invitations-batch"),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/shared/invitation/$', RepoShareInvitationView.as_view(), name="api-v2.1-repo-share-invitation"),
|
2017-05-13 16:16:34 +08:00
|
|
|
## user::avatar
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/user-avatar/$', UserAvatarView.as_view(), name='api-v2.1-user-avatar'),
|
2017-05-13 16:16:34 +08:00
|
|
|
|
2018-11-22 16:46:03 +08:00
|
|
|
## user:webdav
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/webdav-secret/$', WebdavSecretView.as_view(), name='api-v2.1-webdav-secret'),
|
2018-11-22 16:46:03 +08:00
|
|
|
|
2019-02-18 20:26:55 +08:00
|
|
|
## user::starred-item
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/starred-items/$', StarredItems.as_view(), name='api-v2.1-starred-items'),
|
2019-02-18 20:26:55 +08:00
|
|
|
|
2023-01-16 17:56:05 +08:00
|
|
|
## user::monitored-repos
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/monitored-repos/$', MonitoredRepos.as_view(), name='api-v2.1-monitored-repos'),
|
|
|
|
re_path(r'^api/v2.1/monitored-repos/(?P<repo_id>[-0-9a-f]{36})/$', MonitoredRepo.as_view(), name='api-v2.1-monitored-repo'),
|
2023-01-16 17:56:05 +08:00
|
|
|
|
2018-03-20 10:45:42 +08:00
|
|
|
## user::wiki
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/wikis/$', WikisView.as_view(), name='api-v2.1-wikis'),
|
2024-05-15 11:57:30 +08:00
|
|
|
re_path(r'^api/v2.1/wikis/(?P<wiki_id>\d+)/$', WikiView.as_view(), name='api-v2.1-wiki'),
|
|
|
|
re_path(r'^api/v2.1/wikis/(?P<wiki_id>\d+)/dir/$', WikiPagesDirView.as_view(), name='api-v2.1-wiki-pages-dir'),
|
|
|
|
re_path(r'^api/v2.1/wikis/(?P<wiki_id>\d+)/content/$', WikiPageContentView.as_view(), name='api-v2.1-wiki-pages-content'),
|
2023-06-12 09:53:31 +08:00
|
|
|
path('view-image-via-public-wiki/', view_media_file_via_public_wiki, name='view_media_file_via_public_wiki'),
|
2018-03-20 10:45:42 +08:00
|
|
|
|
2024-05-15 11:57:30 +08:00
|
|
|
## user::wiki2
|
|
|
|
re_path(r'^api/v2.1/wikis2/$', Wikis2View.as_view(), name='api-v2.1-wikis2'),
|
2024-07-19 12:27:39 +08:00
|
|
|
re_path(r'^api/v2.1/wiki2/(?P<wiki_id>[-0-9a-f]{36})/$', Wiki2View.as_view(), name='api-v2.1-wiki2'),
|
|
|
|
re_path(r'^api/v2.1/wiki2/(?P<wiki_id>[-0-9a-f]{36})/config/$', Wiki2ConfigView.as_view(), name='api-v2.1-wiki2-config'),
|
2024-09-12 14:32:00 +08:00
|
|
|
re_path(r'^api/v2.1/wiki2/(?P<wiki_id>[-0-9a-f]{36})/publish/config/$', Wiki2PublishConfigView.as_view(), name='api-v2.1-wiki2-publish-config'),
|
2024-07-19 12:27:39 +08:00
|
|
|
re_path(r'^api/v2.1/wiki2/(?P<wiki_id>[-0-9a-f]{36})/pages/$', Wiki2PagesView.as_view(), name='api-v2.1-wiki2-pages'),
|
|
|
|
re_path(r'^api/v2.1/wiki2/(?P<wiki_id>[-0-9a-f]{36})/page/(?P<page_id>[-0-9a-zA-Z]{4})/$', Wiki2PageView.as_view(), name='api-v2.1-wiki2-page'),
|
2024-09-12 14:32:00 +08:00
|
|
|
re_path(r'^api/v2.1/wiki2/(?P<wiki_id>[-0-9a-f]{36})/publish/page/(?P<page_id>[-0-9a-zA-Z]{4})/$', Wiki2PublishPageView.as_view(), name='api-v2.1-wiki2-page'),
|
2024-07-19 12:27:39 +08:00
|
|
|
re_path(r'^api/v2.1/wiki2/(?P<wiki_id>[-0-9a-f]{36})/duplicate-page/$', Wiki2DuplicatePageView.as_view(), name='api-v2.1-wiki2-duplicate-page'),
|
2024-08-16 10:17:54 +08:00
|
|
|
re_path(r'^api/v2.1/wiki2/(?P<wiki_id>[-0-9a-f]{36})/trash/', WikiPageTrashView.as_view(), name='api-v2.1-wiki2-trash'),
|
2024-09-12 14:32:00 +08:00
|
|
|
re_path(r'^api/v2.1/wiki2/(?P<wiki_id>[-0-9a-f]{36})/publish/$', Wiki2PublishView.as_view(), name='api-v2.1-wiki2-publish'),
|
2018-09-15 16:14:17 +08:00
|
|
|
## user::drafts
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/drafts/$', DraftsView.as_view(), name='api-v2.1-drafts'),
|
|
|
|
re_path(r'^api/v2.1/drafts/(?P<pk>\d+)/$', DraftView.as_view(), name='api-v2.1-draft'),
|
2018-09-15 16:14:17 +08:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/drafts/(?P<pk>\d+)/reviewer/$', DraftReviewerView.as_view(), name='api-v2.1-draft-reviewer'),
|
|
|
|
re_path(r'^api/v2.1/repo/(?P<repo_id>[-0-9a-f]{36})/drafts/$', RepoDraftInfo.as_view(), name='api-v2.1-repo-drafts'),
|
|
|
|
re_path(r'^api/v2.1/repo/(?P<repo_id>[-0-9a-f]{36})/draft-counts/$', RepoDraftCounts.as_view(), name='api-v2.1-repo-draft-counts'),
|
2019-01-18 14:50:42 +08:00
|
|
|
|
2018-06-14 15:41:10 +08:00
|
|
|
## user::activities
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/activities/$', ActivitiesView.as_view(), name='api-v2.1-acitvity'),
|
2018-06-14 15:41:10 +08:00
|
|
|
|
2020-09-24 10:57:45 +08:00
|
|
|
## user::ocm
|
|
|
|
# ocm inter-server api, interact with other server
|
2023-06-12 09:53:31 +08:00
|
|
|
path('ocm-provider/', OCMProviderView.as_view(), name='api-v2.1-ocm-protocol'),
|
|
|
|
re_path(r'' + OCM_ENDPOINT + 'shares/$', OCMSharesView.as_view(), name='api-v2.1-ocm-shares'),
|
|
|
|
re_path(r'' + OCM_ENDPOINT + 'notifications/$', OCMNotificationsView.as_view(), name='api-v2.1-ocm-notifications'),
|
2020-09-24 10:57:45 +08:00
|
|
|
|
|
|
|
# ocm local api, no interaction with other server
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'api/v2.1/ocm/shares-prepare/$', OCMSharesPrepareView.as_view(), name='api-v2.1-ocm-shares-prepare'),
|
|
|
|
re_path(r'api/v2.1/ocm/shares-prepare/(?P<pk>\d+)/$', OCMSharePrepareView.as_view(), name='api-v2.1-ocm-share-prepare'),
|
|
|
|
re_path(r'api/v2.1/ocm/shares-received/$', OCMSharesReceivedView.as_view(), name='api-v2.1-ocm-shares-received'),
|
|
|
|
re_path(r'api/v2.1/ocm/shares-received/(?P<pk>\d+)/$', OCMShareReceivedView.as_view(), name='api-v2.1-ocm-share-received'),
|
2020-09-24 10:57:45 +08:00
|
|
|
# ocm local api, repo related operations
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'api/v2.1/ocm/providers/(?P<provider_id>[-0-9a-f]{36})/repos/(?P<repo_id>[-0-9a-f]{36})/dir/$', OCMReposDirView.as_view(), name='api-v2.1-ocm-repos-dir'),
|
|
|
|
re_path(r'api/v2.1/ocm/providers/(?P<provider_id>[-0-9a-f]{36})/repos/(?P<repo_id>[-0-9a-f]{36})/download-link/$', OCMReposDownloadLinkView.as_view(), name='api-v2.1-ocm-repos-download-link'),
|
|
|
|
re_path(r'api/v2.1/ocm/providers/(?P<provider_id>[-0-9a-f]{36})/repos/(?P<repo_id>[-0-9a-f]{36})/upload-link/$', OCMReposUploadLinkView.as_view(), name='api-v2.1-ocm-repos-upload-link'),
|
2020-09-24 10:57:45 +08:00
|
|
|
|
2019-05-21 18:45:21 +08:00
|
|
|
# admin: activities
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/user-activities/$', UserActivitiesView.as_view(), name='api-v2.1-admin-user-activity'),
|
2019-05-21 18:45:21 +08:00
|
|
|
|
2019-11-05 17:46:06 +08:00
|
|
|
## user::abuse-report
|
|
|
|
# user report an abuse file
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/abuse-reports/$', AbuseReportsView.as_view(), name='api-v2.1-abuse-reports'),
|
2019-11-05 17:46:06 +08:00
|
|
|
|
|
|
|
## admin::abuse-reports
|
|
|
|
# admin get all abuse reports
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/abuse-reports/$', AdminAbuseReportsView.as_view(), name='api-v2.1-admin-abuse-reports'),
|
|
|
|
re_path(r'^api/v2.1/admin/abuse-reports/(?P<pk>\d+)/$', AdminAbuseReportView.as_view(), name='api-v2.1-admin-abuse-report'),
|
2019-11-05 17:46:06 +08:00
|
|
|
|
|
|
|
|
2021-10-13 15:11:51 +08:00
|
|
|
## admin::generate user auth token
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/generate-user-auth-token/$', AdminGenerateUserAuthToken.as_view(), name='api-v2.1-admin-generate-user-auth-token'),
|
2021-10-13 15:11:51 +08:00
|
|
|
|
2017-04-08 17:55:12 +08:00
|
|
|
## admin::sysinfo
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/sysinfo/$', SysInfo.as_view(), name='api-v2.1-sysinfo'),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
2019-09-03 17:02:46 +08:00
|
|
|
## admin:web settings
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/web-settings/$', AdminWebSettings.as_view(), name='api-v2.1-web-settings'),
|
2019-09-03 17:02:46 +08:00
|
|
|
|
2017-07-03 11:51:52 +08:00
|
|
|
## admin::revision-tags
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/revision-tags/tagged-items/$', AdminTaggedItemsView.as_view(), name='api-v2.1-admin-revision-tags-tagged-items'),
|
2017-07-03 11:51:52 +08:00
|
|
|
|
2017-08-09 18:14:00 +08:00
|
|
|
## admin::statistics
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/statistics/file-operations/$', FileOperationsView.as_view(), name='api-v2.1-admin-statistics-file-operations'),
|
|
|
|
re_path(r'^api/v2.1/admin/statistics/total-storage/$', TotalStorageView.as_view(), name='api-v2.1-admin-statistics-total-storage'),
|
|
|
|
re_path(r'^api/v2.1/admin/statistics/active-users/$', ActiveUsersView.as_view(), name='api-v2.1-admin-statistics-active-users'),
|
|
|
|
re_path(r'^api/v2.1/admin/statistics/system-traffic/$', SystemTrafficView.as_view(), name='api-v2.1-admin-statistics-system-traffic'),
|
|
|
|
re_path(r'^api/v2.1/admin/statistics/system-user-traffic/$', SystemUserTrafficView.as_view(), name='api-v2.1-admin-statistics-system-user-traffic'),
|
|
|
|
re_path(r'^api/v2.1/admin/statistics/system-org-traffic/$', SystemOrgTrafficView.as_view(), name='api-v2.1-admin-statistics-system-org-traffic'),
|
|
|
|
re_path(r'^api/v2.1/admin/statistics/system-user-traffic/excel/$', SystemUserTrafficExcelView.as_view(), name='api-v2.1-admin-statistics-system-user-traffic-excel'),
|
|
|
|
re_path(r'^api/v2.1/admin/statistics/system-user-storage/excel/$', SystemUserStorageExcelView.as_view(), name='api-v2.1-admin-statistics-system-user-storage-excel'),
|
2017-08-28 14:52:28 +08:00
|
|
|
## admin::users
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/users/$', AdminUsers.as_view(), name='api-v2.1-admin-users'),
|
|
|
|
re_path(r'^api/v2.1/admin/ldap-users/$', AdminLDAPUsers.as_view(), name='api-v2.1-admin-ldap-users'),
|
|
|
|
re_path(r'^api/v2.1/admin/search-user/$', AdminSearchUser.as_view(), name='api-v2.1-admin-search-user'),
|
|
|
|
re_path(r'^api/v2.1/admin/update-user-ccnet-email/$', AdminUpdateUserCcnetEmail.as_view(), name='api-v2.1-admin-update-user-ccnet-email'),
|
2024-05-17 11:14:55 +08:00
|
|
|
re_path(r'^api/v2.1/admin/user-list/$', AdminUserList.as_view(), name='api-v2.1-admin-user-list'),
|
2024-06-12 17:33:07 +08:00
|
|
|
re_path(r'^api/v2.1/admin/user-convert-to-team/$', AdminUserConvertToTeamView.as_view(), name='api-v2.1-admin-user-list'),
|
2021-03-14 13:50:54 +08:00
|
|
|
|
2017-09-11 14:27:35 +08:00
|
|
|
# [^...] Matches any single character not in brackets
|
|
|
|
# + Matches between one and unlimited times, as many times as possible
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/users/(?P<email>[^/]+@[^/]+)/$', AdminUser.as_view(), name='api-v2.1-admin-user'),
|
|
|
|
re_path(r'^api/v2.1/admin/users/(?P<email>[^/]+@[^/]+)/reset-password/$', AdminUserResetPassword.as_view(), name='api-v2.1-admin-user-reset-password'),
|
|
|
|
re_path(r'^api/v2.1/admin/users/(?P<email>[^/]+@[^/]+)/groups/$', AdminUserGroups.as_view(), name='api-v2.1-admin-user-groups'),
|
|
|
|
re_path(r'^api/v2.1/admin/users/(?P<email>[^/]+@[^/]+)/share-links/$', AdminUserShareLinks.as_view(), name='api-v2.1-admin-user-share-links'),
|
|
|
|
re_path(r'^api/v2.1/admin/users/(?P<email>[^/]+@[^/]+)/upload-links/$', AdminUserUploadLinks.as_view(), name='api-v2.1-admin-user-upload-links'),
|
|
|
|
re_path(r'^api/v2.1/admin/users/(?P<email>[^/]+@[^/]+)/beshared-repos/$', AdminUserBeSharedRepos.as_view(), name='api-v2.1-admin-user-beshared-repos'),
|
2019-10-15 16:05:51 +08:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/admin-users/$', AdminAdminUsers.as_view(), name='api-v2.1-admin-admin-users'),
|
2017-08-28 14:52:28 +08:00
|
|
|
|
2019-12-16 18:31:29 +08:00
|
|
|
## admin::users-batch
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/admin-users/batch/$', AdminAdminUsersBatch.as_view(), name='api-v2.1-admin-users-batch'),
|
|
|
|
re_path(r'^api/v2.1/admin/users/batch/$', AdminUsersBatch.as_view(), name='api-v2.1-admin-users-batch'),
|
|
|
|
re_path(r'^api/v2.1/admin/import-users/$', AdminImportUsers.as_view(), name='api-v2.1-admin-import-users'),
|
2019-12-16 18:31:29 +08:00
|
|
|
|
2017-04-08 17:55:12 +08:00
|
|
|
## admin::devices
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/devices/$', AdminDevices.as_view(), name='api-v2.1-admin-devices'),
|
|
|
|
re_path(r'^api/v2.1/admin/device-errors/$', AdminDeviceErrors.as_view(), name='api-v2.1-admin-device-errors'),
|
|
|
|
re_path(r'^api/v2.1/admin/device-trusted-ip/$', AdminDeviceTrustedIP.as_view(), name='api-v2.1-admin-device-trusted-ip'),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
|
|
|
## admin::libraries
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/libraries/$', AdminLibraries.as_view(), name='api-v2.1-admin-libraries'),
|
|
|
|
re_path(r'^api/v2.1/admin/search-library/$', AdminSearchLibrary.as_view(), name='api-v2.1-admin-search-library'),
|
|
|
|
re_path(r'^api/v2.1/admin/libraries/(?P<repo_id>[-0-9a-f]{36})/$', AdminLibrary.as_view(), name='api-v2.1-admin-library'),
|
|
|
|
re_path(r'^api/v2.1/admin/libraries/(?P<repo_id>[-0-9a-f]{36})/history-limit/$', AdminLibraryHistoryLimit.as_view(), name="api-v2.1-admin-library-history-limit"),
|
|
|
|
re_path(r'^api/v2.1/admin/libraries/(?P<repo_id>[-0-9a-f]{36})/dirents/$', AdminLibraryDirents.as_view(), name='api-v2.1-admin-library-dirents'),
|
|
|
|
re_path(r'^api/v2.1/admin/libraries/(?P<repo_id>[-0-9a-f]{36})/dirent/$', AdminLibraryDirent.as_view(), name='api-v2.1-admin-library-dirent'),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
|
|
|
## admin::system-library
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/system-library/$', AdminSystemLibrary.as_view(), name='api-v2.1-admin-system-library'),
|
|
|
|
re_path(r'^api/v2.1/admin/system-library/upload-link/$', AdminSystemLibraryUploadLink.as_view(), name='api-v2.1-admin-system-library-upload-link'),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
|
|
|
## admin::default-library
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/default-library/$', AdminDefaultLibrary.as_view(), name='api-v2.1-admin-default-library'),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
|
|
|
## admin::trash-libraries
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/trash-libraries/$', AdminTrashLibraries.as_view(), name='api-v2.1-admin-trash-libraries'),
|
|
|
|
re_path(r'^api/v2.1/admin/trash-libraries/(?P<repo_id>[-0-9a-f]{36})/$', AdminTrashLibrary.as_view(), name='api-v2.1-admin-trash-library'),
|
2017-04-08 17:55:12 +08:00
|
|
|
|
|
|
|
## admin::groups
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/groups/$', AdminGroups.as_view(), name='api-v2.1-admin-groups'),
|
|
|
|
re_path(r'^api/v2.1/admin/search-group/$', AdminSearchGroup.as_view(), name='api-v2.1-admin-search-group'),
|
|
|
|
re_path(r'^api/v2.1/admin/groups/(?P<group_id>\d+)/$', AdminGroup.as_view(), name='api-v2.1-admin-group'),
|
|
|
|
re_path(r'^api/v2.1/admin/groups/(?P<group_id>\d+)/libraries/$', AdminGroupLibraries.as_view(), name='api-v2.1-admin-group-libraries'),
|
|
|
|
re_path(r'^api/v2.1/admin/groups/(?P<group_id>\d+)/libraries/(?P<repo_id>[-0-9a-f]{36})/$', AdminGroupLibrary.as_view(), name='api-v2.1-admin-group-library'),
|
|
|
|
re_path(r'^api/v2.1/admin/groups/(?P<group_id>\d+)/members/$', AdminGroupMembers.as_view(), name='api-v2.1-admin-group-members'),
|
|
|
|
re_path(r'^api/v2.1/admin/groups/(?P<group_id>\d+)/members/(?P<email>[^/]+)/$', AdminGroupMember.as_view(), name='api-v2.1-admin-group-member'),
|
|
|
|
re_path(r'^api/v2.1/admin/groups/(?P<group_id>\d+)/group-owned-libraries/$', AdminGroupOwnedLibraries.as_view(), name='api-v2.1-admin-group-owned-libraries'),
|
|
|
|
re_path(r'^api/v2.1/admin/groups/(?P<group_id>\d+)/group-owned-libraries/(?P<repo_id>[-0-9a-f]{36})/$', AdminGroupOwnedLibrary.as_view(), name='api-v2.1-admin-owned-group-library'),
|
2024-07-27 11:21:59 +08:00
|
|
|
re_path(r'^api/v2.1/admin/groups/(?P<group_id>\d+)/group-to-department/', AdminGroupToDeptView.as_view(), name='api-v2.1-admin-group-to-department'),
|
|
|
|
|
2024-04-25 12:08:13 +08:00
|
|
|
## admin::departments
|
|
|
|
re_path(r'api/v2.1/admin/departments/$', AdminDepartments.as_view(), name='api-v2.1-admin-departments'),
|
2024-08-24 23:08:18 +08:00
|
|
|
|
2017-04-08 17:55:12 +08:00
|
|
|
## admin::shares
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/shares/$', AdminShares.as_view(), name='api-v2.1-admin-shares'),
|
2017-09-09 15:27:04 +08:00
|
|
|
|
2019-10-22 11:59:48 +08:00
|
|
|
## admin::logs
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/logs/login-logs/$', AdminLogsLoginLogs.as_view(), name='api-v2.1-admin-logs-login-logs'),
|
|
|
|
re_path(r'^api/v2.1/admin/logs/file-access-logs/$', AdminLogsFileAccessLogs.as_view(), name='api-v2.1-admin-logs-file-access-logs'),
|
|
|
|
re_path(r'^api/v2.1/admin/logs/file-update-logs/$', AdminLogsFileUpdateLogs.as_view(), name='api-v2.1-admin-logs-file-update-logs'),
|
|
|
|
re_path(r'^api/v2.1/admin/logs/share-permission-logs/$', AdminLogsSharePermissionLogs.as_view(), name='api-v2.1-admin-logs-share-permission-logs'),
|
2019-10-22 11:59:48 +08:00
|
|
|
|
2017-09-09 15:27:04 +08:00
|
|
|
## admin::admin logs
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/admin-logs/$', AdminOperationLogs.as_view(), name='api-v2.1-admin-admin-operation-logs'),
|
|
|
|
re_path(r'^api/v2.1/admin/admin-login-logs/$', AdminLoginLogs.as_view(), name='api-v2.1-admin-admin-login-logs'),
|
2016-05-25 10:45:22 +08:00
|
|
|
|
2017-06-21 14:48:48 +08:00
|
|
|
## admin::share-links
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/share-links/$', AdminShareLinks.as_view(), name='api-v2.1-admin-share-links'),
|
|
|
|
re_path(r'^api/v2.1/admin/share-links/(?P<token>[a-f0-9]+)/$', AdminShareLink.as_view(), name='api-v2.1-admin-share-link'),
|
|
|
|
re_path(r'^api/v2.1/admin/share-links/(?P<token>[a-f0-9]+)/download/$',
|
2017-06-21 14:48:48 +08:00
|
|
|
AdminShareLinkDownload.as_view(), name='api-v2.1-admin-share-link-download'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/share-links/(?P<token>[a-f0-9]+)/check-password/$',
|
2017-06-21 14:48:48 +08:00
|
|
|
AdminShareLinkCheckPassword.as_view(), name='api-v2.1-admin-share-link-check-password'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/share-links/(?P<token>[a-f0-9]+)/dirents/$',
|
2017-06-21 14:48:48 +08:00
|
|
|
AdminShareLinkDirents.as_view(), name='api-v2.1-admin-share-link-dirents'),
|
|
|
|
|
|
|
|
## admin::upload-links
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/upload-links/$', AdminUploadLinks.as_view(), name='api-v2.1-admin-upload-links'),
|
|
|
|
re_path(r'^api/v2.1/admin/upload-links/(?P<token>[a-f0-9]+)/$', AdminUploadLink.as_view(), name='api-v2.1-admin-upload-link'),
|
|
|
|
re_path(r'^api/v2.1/admin/upload-links/(?P<token>[a-f0-9]+)/upload/$',
|
2017-06-21 14:48:48 +08:00
|
|
|
AdminUploadLinkUpload.as_view(), name='api-v2.1-admin-upload-link-upload'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/upload-links/(?P<token>[a-f0-9]+)/check-password/$',
|
2017-06-21 14:48:48 +08:00
|
|
|
AdminUploadLinkCheckPassword.as_view(), name='api-v2.1-admin-upload-link-check-password'),
|
|
|
|
|
2017-09-09 15:27:04 +08:00
|
|
|
## admin::admin-role
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/admin-role/$', AdminAdminRole.as_view(), name='api-v2.1-admin-admin-role'),
|
2017-09-09 15:27:04 +08:00
|
|
|
|
2017-04-08 17:55:12 +08:00
|
|
|
## admin::organizations
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/organizations/$', AdminOrganizations.as_view(), name='api-v2.1-admin-organizations'),
|
2024-05-17 11:14:55 +08:00
|
|
|
re_path(r'^api/v2.1/admin/organizations-basic-info/$', AdminOrganizationsBaseInfo.as_view(), name='api-v2.1-admin-organizations-basic-info'),
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/search-organization/$', AdminSearchOrganization.as_view(), name='api-v2.1-admin-Search-organization'),
|
|
|
|
re_path(r'^api/v2.1/admin/organizations/(?P<org_id>\d+)/$', AdminOrganization.as_view(), name='api-v2.1-admin-organization'),
|
|
|
|
re_path(r'^api/v2.1/admin/organizations/(?P<org_id>\d+)/users/$', AdminOrgUsers.as_view(), name='api-v2.1-admin-org-users'),
|
|
|
|
re_path(r'^api/v2.1/admin/organizations/(?P<org_id>\d+)/users/(?P<email>[^/]+)/$', AdminOrgUser.as_view(), name='api-v2.1-admin-org-user'),
|
|
|
|
re_path(r'^api/v2.1/admin/organizations/(?P<org_id>\d+)/groups/$', AdminOrgGroups.as_view(),name='api-v2.1-admin-org-groups'),
|
|
|
|
re_path(r'^api/v2.1/admin/organizations/(?P<org_id>\d+)/repos/$', AdminOrgRepos.as_view(),name='api-v2.1-admin-org-repos'),
|
|
|
|
re_path(r'^api/v2.1/admin/organizations/(?P<org_id>\d+)/statistics/traffic/$', AdminOrgStatsTraffic.as_view(), name='api-v2.1-admin-org-stats-traffic'),
|
2017-03-09 16:42:06 +08:00
|
|
|
|
2019-11-02 13:16:49 +08:00
|
|
|
## admin::institutions
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/institutions/$', AdminInstitutions.as_view(), name='api-v2.1-admin-institutions'),
|
|
|
|
re_path(r'^api/v2.1/admin/institutions/(?P<institution_id>\d+)/$', AdminInstitution.as_view(), name='api-v2.1-admin-institution'),
|
|
|
|
re_path(r'^api/v2.1/admin/institutions/(?P<institution_id>\d+)/users/$', AdminInstitutionUsers.as_view(), name='api-v2.1-admin-institution-users'),
|
|
|
|
re_path(r'^api/v2.1/admin/institutions/(?P<institution_id>\d+)/users/(?P<email>[^/]+)/$', AdminInstitutionUser.as_view(), name='api-v2.1-admin-institution-user'),
|
2019-11-02 13:16:49 +08:00
|
|
|
|
2017-05-17 16:59:38 +08:00
|
|
|
## admin::logo
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/logo/$', AdminLogo.as_view(), name='api-v2.1-admin-logo'),
|
|
|
|
re_path(r'^api/v2.1/admin/favicon/$', AdminFavicon.as_view(), name='api-v2.1-admin-favicon'),
|
|
|
|
re_path(r'^api/v2.1/admin/license/$', AdminLicense.as_view(), name='api-v2.1-admin-license'),
|
|
|
|
re_path(r'^api/v2.1/admin/login-background-image/$', AdminLoginBgImage.as_view(), name='api-v2.1-admin-login-background-image'),
|
2017-05-17 16:59:38 +08:00
|
|
|
|
2017-07-15 17:35:30 +08:00
|
|
|
## admin::invitations
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/invitations/$', AdminInvitations.as_view(), name='api-v2.1-admin-invitations'),
|
|
|
|
re_path(r'^api/v2.1/admin/invitations/(?P<token>[a-f0-9]{32})/$', AdminInvitation.as_view(), name='api-v2.1-admin-invitation'),
|
|
|
|
|
2024-05-29 11:51:52 +08:00
|
|
|
re_path(r'^wikis/(?P<wiki_id>[^/]+)/$', wiki_view, name='wiki'),
|
2024-09-12 14:32:00 +08:00
|
|
|
re_path(r'^wiki/publish/(?P<publish_url>[-0-9a-zA-Z]+)/$', wiki_publish_view, name='wiki-publish'),
|
2024-05-06 14:24:39 +08:00
|
|
|
|
2023-06-12 09:53:31 +08:00
|
|
|
path('avatar/', include('seahub.avatar.urls')),
|
|
|
|
path('group/', include('seahub.group.urls')),
|
|
|
|
path('options/', include('seahub.options.urls')),
|
|
|
|
path('profile/', include('seahub.profile.urls')),
|
|
|
|
path('share/', include('seahub.share.urls')),
|
|
|
|
path('help/', include('seahub.help.urls')),
|
|
|
|
path('captcha/', include('captcha.urls')),
|
|
|
|
path('thumbnail/', include('seahub.thumbnail.urls')),
|
|
|
|
path('inst/', include(('seahub.institutions.urls', 'institutions'), namespace='institutions')),
|
|
|
|
path('invite/', include(('seahub.invitations.urls', 'invitations'), namespace='invitations')),
|
|
|
|
path('terms/', include('termsandconditions.urls')),
|
|
|
|
path('published/', include(('seahub.wiki.urls', 'wiki'), namespace='wiki')),
|
|
|
|
path('work-weixin/', include('seahub.work_weixin.urls')),
|
|
|
|
path('weixin/', include('seahub.weixin.urls')),
|
2019-05-15 17:16:47 +08:00
|
|
|
# Must specify a namespace if specifying app_name.
|
2023-06-12 09:53:31 +08:00
|
|
|
path('drafts/', include(('seahub.drafts.urls', 'drafts'), namespace='drafts')),
|
2012-05-23 13:56:17 +08:00
|
|
|
|
2017-12-23 12:01:57 +08:00
|
|
|
## admin::address book
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/address-book/groups/$', AdminAddressBookGroups.as_view(), name='api-v2.1-admin-address-book-groups'),
|
|
|
|
re_path(r'^api/v2.1/admin/address-book/groups/(?P<group_id>\d+)/$', AdminAddressBookGroup.as_view(), name='api-v2.1-admin-address-book-group'),
|
2017-12-23 12:01:57 +08:00
|
|
|
|
2019-03-13 16:50:30 +08:00
|
|
|
## admin::file-scan-records
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/file-scan-records/$', AdminFileScanRecords.as_view(), name='api-v2.1-admin-file-scan-records'),
|
2019-03-13 16:50:30 +08:00
|
|
|
|
2020-07-09 14:15:17 +08:00
|
|
|
# admin::virus-files
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/virus-files/$', AdminVirusFilesView.as_view(), name='api-v2.1-admin-virus-files'),
|
|
|
|
re_path(r'^api/v2.1/admin/virus-files/(?P<virus_id>\d+)/$', AdminVirusFileView.as_view(), name='api-v2.1-admin-virus-file'),
|
|
|
|
re_path(r'^api/v2.1/admin/virus-files/batch/$', AdminVirusFilesBatchView.as_view(), name='api-v2.1-admin-virus-files-batch'),
|
2019-11-06 11:51:38 +08:00
|
|
|
|
2019-04-13 18:15:40 +08:00
|
|
|
## admin::notifications
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/notifications/$', AdminNotificationsView.as_view(), name='api-2.1-admin-notifications'),
|
|
|
|
re_path(r'^api/v2.1/admin/sys-notifications/$', AdminSysNotificationsView.as_view(), name='api-2.1-admin-sys-notifications'),
|
|
|
|
re_path(r'^api/v2.1/admin/sys-notifications/(?P<nid>\d+)/$', AdminSysNotificationView.as_view(),name='api-2.1-admin-sys-notification'),
|
2019-04-13 18:15:40 +08:00
|
|
|
|
2019-11-07 13:32:46 +08:00
|
|
|
## admin::terms and conditions
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/terms-and-conditions/$', AdminTermsAndConditions.as_view(), name='api-v2.1-admin-terms-and-conditions'),
|
|
|
|
re_path(r'^api/v2.1/admin/terms-and-conditions/(?P<term_id>\d+)/$', AdminTermAndCondition.as_view(), name='api-v2.1-admin-term-and-condition'),
|
2019-11-07 13:32:46 +08:00
|
|
|
|
2019-05-28 11:44:19 +08:00
|
|
|
## admin::work weixin departments
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/work-weixin/departments/$', AdminWorkWeixinDepartments.as_view(), name='api-v2.1-admin-work-weixin-departments'),
|
|
|
|
re_path(r'^api/v2.1/admin/work-weixin/departments/(?P<department_id>\d+)/members/$', AdminWorkWeixinDepartmentMembers.as_view(), name='api-v2.1-admin-work-weixin-department-members'),
|
|
|
|
re_path(r'^api/v2.1/admin/work-weixin/users/batch/$', AdminWorkWeixinUsersBatch.as_view(), name='api-v2.1-admin-work-weixin-users'),
|
|
|
|
re_path(r'^api/v2.1/admin/work-weixin/departments/import/$', AdminWorkWeixinDepartmentsImport.as_view(), name='api-v2.1-admin-work-weixin-department-import'),
|
2019-05-28 11:44:19 +08:00
|
|
|
|
2020-03-19 20:15:26 +08:00
|
|
|
## admin:dingtalk departments
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/dingtalk/departments/$', AdminDingtalkDepartments.as_view(), name='api-v2.1-admin-dingtalk-departments'),
|
|
|
|
re_path(r'^api/v2.1/admin/dingtalk/departments/(?P<department_id>\d+)/members/$', AdminDingtalkDepartmentMembers.as_view(), name='api-v2.1-admin-dingtalk-department-members'),
|
|
|
|
re_path(r'^api/v2.1/admin/dingtalk/users/batch/$', AdminDingtalkUsersBatch.as_view(), name='api-v2.1-admin-dingtalk-users-batch'),
|
|
|
|
re_path(r'^api/v2.1/admin/dingtalk/departments/import/$', AdminDingtalkDepartmentsImport.as_view(), name='api-v2.1-admin-dingtalk-department-import'),
|
2020-03-19 20:15:26 +08:00
|
|
|
|
2024-07-21 18:42:47 +08:00
|
|
|
## internal
|
|
|
|
re_path(r'^api/v2.1/internal/user-list/$', InternalUserListView.as_view(), name="api-v2.1-internal-user-list"),
|
2024-09-06 15:15:41 +08:00
|
|
|
re_path(r'^api/v2.1/internal/check-share-link-access/$', InternalCheckShareLinkAccess.as_view(), name="api-v2.1-internal-share-link-info"),
|
|
|
|
re_path(r'^api/v2.1/internal/repos/(?P<repo_id>[-0-9a-f]{36})/check-access/$', InternalCheckFileOperationAccess.as_view(), name="api-v2.1-internal-check-file-op-access"),
|
|
|
|
|
2015-01-25 18:47:42 +08:00
|
|
|
### system admin ###
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^sys/seafadmin/delete/(?P<repo_id>[-0-9a-f]{36})/$', sys_repo_delete, name='sys_repo_delete'),
|
|
|
|
path('sys/useradmin/export-excel/', sys_useradmin_export_excel, name='sys_useradmin_export_excel'),
|
|
|
|
path('sys/groupadmin/export-excel/', sys_group_admin_export_excel, name='sys_group_admin_export_excel'),
|
|
|
|
path('sys/orgadmin/<int:org_id>/set_quota/', sys_org_set_quota, name='sys_org_set_quota'),
|
|
|
|
path('sys/orgadmin/<int:org_id>/set_member_quota/', sys_org_set_member_quota, name='sys_org_set_member_quota'),
|
|
|
|
re_path(r'^sys/sudo/', sys_sudo_mode, name='sys_sudo_mode'),
|
|
|
|
re_path(r'^sys/check-license/', sys_check_license, name='sys_check_license'),
|
|
|
|
path('useradmin/add/', user_add, name="user_add"),
|
|
|
|
path('useradmin/remove/<str:email>/', user_remove, name="user_remove"),
|
|
|
|
path('useradmin/removeadmin/<str:email>/', user_remove_admin, name='user_remove_admin'),
|
|
|
|
path('useradmin/toggle_role/<str:email>/', user_toggle_role, name='user_toggle_role'),
|
|
|
|
path('useradmin/<str:email>/set_quota/', user_set_quota, name='user_set_quota'),
|
|
|
|
path('useradmin/password/reset/<str:email>/', user_reset, name='user_reset'),
|
|
|
|
path('useradmin/batchmakeadmin/', batch_user_make_admin, name='batch_user_make_admin'),
|
|
|
|
path('useradmin/batchadduser/example/', batch_add_user_example, name='batch_add_user_example'),
|
|
|
|
|
|
|
|
path('sys/info/', sysadmin_react_fake_view, name="sys_info"),
|
|
|
|
path('sys/statistics/file/', sysadmin_react_fake_view, name="sys_statistics_file"),
|
|
|
|
path('sys/statistics/storage/', sysadmin_react_fake_view, name="sys_statistics_storage"),
|
|
|
|
path('sys/statistics/user/', sysadmin_react_fake_view, name="sys_statistics_user"),
|
|
|
|
path('sys/statistics/traffic/', sysadmin_react_fake_view, name="sys_statistics_traffic"),
|
|
|
|
path('sys/statistics/reports/', sysadmin_react_fake_view, name="sys_statistics_reports"),
|
|
|
|
path('sys/desktop-devices/', sysadmin_react_fake_view, name="sys_desktop_devices"),
|
|
|
|
path('sys/mobile-devices/', sysadmin_react_fake_view, name="sys_mobile_devices"),
|
|
|
|
path('sys/device-errors/', sysadmin_react_fake_view, name="sys_device_errors"),
|
|
|
|
path('sys/notifications/', sysadmin_react_fake_view, name="sys_notifications"),
|
|
|
|
path('sys/web-settings/', sysadmin_react_fake_view, name="sys_web_settings"),
|
|
|
|
path('sys/all-libraries/', sysadmin_react_fake_view, name="sys_all_libraries"),
|
|
|
|
path('sys/search-libraries/', sysadmin_react_fake_view, name="sys_search_libraries"),
|
|
|
|
path('sys/system-library/', sysadmin_react_fake_view, name="sys_system_library"),
|
|
|
|
path('sys/trash-libraries/', sysadmin_react_fake_view, name="sys_trash_libraries"),
|
|
|
|
re_path(r'^sys/libraries/(?P<repo_id>[-0-9a-f]{36})/$', sysadmin_react_fake_view, name="sys_libraries_template"),
|
|
|
|
re_path(r'^sys/libraries/(?P<repo_id>[-0-9a-f]{36})/(?P<repo_name>[^/]+)/(?P<path>.*)$', sysadmin_react_fake_view, name="sys_libraries_template_dirent"),
|
|
|
|
path('sys/groups/', sysadmin_react_fake_view, name="sys_groups"),
|
|
|
|
path('sys/search-groups/', sysadmin_react_fake_view, name="sys_search_groups"),
|
|
|
|
path('sys/groups/<int:group_id>/libraries/', sysadmin_react_fake_view, name="sys_group_libraries"),
|
|
|
|
path('sys/groups/<int:group_id>/members/', sysadmin_react_fake_view, name="sys_group_members"),
|
|
|
|
path('sys/departments/', sysadmin_react_fake_view, name="sys_departments"),
|
|
|
|
path('sys/departments/<int:group_id>/', sysadmin_react_fake_view, name="sys_department"),
|
|
|
|
path('sys/departments/<int:group_id>/members/', sysadmin_react_fake_view, name="sys_department_members"),
|
|
|
|
path('sys/departments/<int:group_id>/libraries/', sysadmin_react_fake_view, name="sys_department_libraries"),
|
|
|
|
path('sys/users/', sysadmin_react_fake_view, name="sys_users"),
|
|
|
|
path('sys/search-users/', sysadmin_react_fake_view, name="sys_search_users"),
|
|
|
|
path('sys/users/admins/', sysadmin_react_fake_view, name="sys_users_admin"),
|
|
|
|
path('sys/users/ldap/', sysadmin_react_fake_view, name="sys_users_ldap"),
|
|
|
|
path('sys/users/ldap-imported/', sysadmin_react_fake_view, name="sys_users_ldap_imported"),
|
|
|
|
path('sys/users/<str:email>/', sysadmin_react_fake_view, name="sys_user"),
|
|
|
|
path('sys/users/<str:email>/owned-libraries/', sysadmin_react_fake_view, name="sys_user_repos"),
|
|
|
|
path('sys/users/<str:email>/shared-libraries/', sysadmin_react_fake_view, name="sys_user_shared_repos"),
|
|
|
|
path('sys/users/<str:email>/shared-links/', sysadmin_react_fake_view, name="sys_user_shared_links"),
|
|
|
|
path('sys/users/<str:email>/groups/', sysadmin_react_fake_view, name="sys_user_groups"),
|
|
|
|
path('sys/logs/login/', sysadmin_react_fake_view, name="sys_logs_login"),
|
|
|
|
path('sys/logs/file-access/', sysadmin_react_fake_view, name="sys_logs_file_access"),
|
|
|
|
path('sys/logs/file-update/', sysadmin_react_fake_view, name="sys_logs_file_update"),
|
|
|
|
path('sys/logs/share-permission/', sysadmin_react_fake_view, name="sys_logs_share_permission"),
|
|
|
|
path('sys/admin-logs/operation/', sysadmin_react_fake_view, name="sys_admin_logs_operation"),
|
|
|
|
path('sys/admin-logs/login/', sysadmin_react_fake_view, name="sys_admin_logs_login"),
|
|
|
|
path('sys/organizations/', sysadmin_react_fake_view, name="sys_organizations"),
|
|
|
|
path('sys/search-organizations/', sysadmin_react_fake_view, name="sys_search_organizations"),
|
|
|
|
path('sys/organizations/<int:org_id>/info/', sysadmin_react_fake_view, name="sys_organization_info"),
|
|
|
|
path('sys/organizations/<int:org_id>/users/', sysadmin_react_fake_view, name="sys_organization_users"),
|
|
|
|
path('sys/organizations/<int:org_id>/groups/', sysadmin_react_fake_view, name="sys_organization_groups"),
|
|
|
|
path('sys/organizations/<int:org_id>/libraries/', sysadmin_react_fake_view, name="sys_organization_repos"),
|
|
|
|
path('sys/institutions/', sysadmin_react_fake_view, name="sys_institutions"),
|
|
|
|
path('sys/institutions/<int:inst_id>/info/', sysadmin_react_fake_view, name="sys_institution_info"),
|
|
|
|
path('sys/institutions/<int:inst_id>/members/', sysadmin_react_fake_view, name="sys_institution_members"),
|
|
|
|
path('sys/institutions/<int:inst_id>/admins/', sysadmin_react_fake_view, name="sys_institution_admins"),
|
|
|
|
path('sys/terms-and-conditions/', sysadmin_react_fake_view, name="terms_and_conditions"),
|
|
|
|
path('sys/share-links/', sysadmin_react_fake_view, name="sys_share_links"),
|
|
|
|
path('sys/upload-links/', sysadmin_react_fake_view, name="sys_upload_links"),
|
|
|
|
path('sys/work-weixin/', sysadmin_react_fake_view, name="sys_work_weixin"),
|
|
|
|
path('sys/work-weixin/departments/', sysadmin_react_fake_view, name="sys_work_weixin_departments"),
|
|
|
|
path('sys/dingtalk/', sysadmin_react_fake_view, name="sys_dingtalk"),
|
|
|
|
path('sys/dingtalk/departments/', sysadmin_react_fake_view, name="sys_dingtalk_departments"),
|
|
|
|
path('sys/invitations/', sysadmin_react_fake_view, name="sys_invitations"),
|
|
|
|
path('sys/abuse-reports/', sysadmin_react_fake_view, name="sys_abuse_reports"),
|
|
|
|
|
|
|
|
path('client-login/', client_token_login, name='client_token_login'),
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2011-03-19 13:15:02 +08:00
|
|
|
|
2019-03-13 16:50:30 +08:00
|
|
|
try:
|
|
|
|
from seahub.settings import ENABLE_FILE_SCAN
|
|
|
|
except ImportError:
|
|
|
|
ENABLE_FILE_SCAN = False
|
|
|
|
if ENABLE_FILE_SCAN:
|
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
path('sys/file-scan-records/', sysadmin_react_fake_view, name="sys_file_scan_records"),
|
2019-03-13 16:50:30 +08:00
|
|
|
]
|
|
|
|
|
2015-08-17 11:20:00 +08:00
|
|
|
from seahub.utils import EVENTS_ENABLED
|
|
|
|
if EVENTS_ENABLED:
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
path('sys/virus-files/all/', sysadmin_react_fake_view, name='sys_virus_scan_records'),
|
|
|
|
path('sys/virus-files/unhandled/', sysadmin_react_fake_view, name='sys_virus_scan_records'),
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2015-08-17 11:20:00 +08:00
|
|
|
|
2012-12-03 21:47:27 +08:00
|
|
|
if settings.SERVE_STATIC:
|
2018-02-06 17:36:04 +08:00
|
|
|
from django.views.static import serve as static_view
|
2011-03-19 13:15:02 +08:00
|
|
|
media_url = settings.MEDIA_URL.strip('/')
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^%s/(?P<path>.*)$' % (media_url), static_view,
|
2018-02-06 17:36:04 +08:00
|
|
|
{'document_root': settings.MEDIA_ROOT}),
|
|
|
|
]
|
2012-07-19 17:18:40 +08:00
|
|
|
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^demo/', demo),
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2013-05-15 13:43:21 +08:00
|
|
|
|
2024-08-24 23:08:18 +08:00
|
|
|
from seahub.utils import HAS_FILE_SEARCH, HAS_FILE_SEASEARCH
|
|
|
|
if HAS_FILE_SEARCH or HAS_FILE_SEASEARCH:
|
2021-08-26 13:37:28 +08:00
|
|
|
from seahub.search.views import search, pubuser_search
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
path('search/', search, name='search'),
|
|
|
|
path('pubinfo/users/search/', pubuser_search, name='pubuser_search'),
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2013-05-28 12:13:10 +08:00
|
|
|
|
2021-08-27 10:46:28 +08:00
|
|
|
from seahub.utils import is_pro_version
|
|
|
|
if is_pro_version():
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/admin/logs/login/$', LoginLogs.as_view(), name='api-v2.1-admin-logs-login'),
|
|
|
|
re_path(r'^api/v2.1/admin/logs/file-audit/$', FileAudit.as_view(), name='api-v2.1-admin-logs-file-audit'),
|
|
|
|
re_path(r'^api/v2.1/admin/logs/file-update/$', FileUpdate.as_view(), name='api-v2.1-admin-logs-file-update'),
|
|
|
|
re_path(r'^api/v2.1/admin/logs/perm-audit/$', PermAudit.as_view(), name='api-v2.1-admin-logs-perm-audit'),
|
2024-07-10 14:38:25 +08:00
|
|
|
|
|
|
|
re_path(r'^api/v2.1/admin/logs/export-excel/$', SysLogsExport.as_view(), name='api-v2.1-admin-logs-export-excel'),
|
2024-09-02 18:07:40 +08:00
|
|
|
re_path(r'^api/v2.1/query-io-status/$', SeahubIOStatus.as_view(), name='api-v2.1-query-export-status'),
|
2024-07-10 14:38:25 +08:00
|
|
|
path('sys/log/export-excel/', sys_log_export_excel, name='sys_log_export_excel'),
|
|
|
|
|
|
|
|
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2014-03-05 14:10:05 +08:00
|
|
|
|
|
|
|
if getattr(settings, 'MULTI_TENANCY', False):
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/org/', include('seahub.organizations.api_urls')),
|
|
|
|
path('org/', include('seahub.organizations.urls')),
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2014-03-05 14:10:05 +08:00
|
|
|
|
2024-05-17 15:26:04 +08:00
|
|
|
if getattr(settings, 'MULTI_INSTITUTION', False):
|
|
|
|
urlpatterns += [
|
|
|
|
re_path(r'^api/v2.1/institutions/', include('seahub.institutions.api_urls')),
|
|
|
|
]
|
|
|
|
|
2015-03-05 14:48:07 +08:00
|
|
|
if getattr(settings, 'ENABLE_SHIB_LOGIN', False):
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^shib-complete/', TemplateView.as_view(template_name='shibboleth/complete.html'), name="shib_complete"),
|
|
|
|
re_path(r'^shib-success/', TemplateView.as_view(template_name="shibboleth/success.html"), name="shib_success"),
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2015-03-05 14:48:07 +08:00
|
|
|
|
2016-03-24 16:25:45 +08:00
|
|
|
|
2015-11-17 14:41:10 +08:00
|
|
|
if getattr(settings, 'ENABLE_KRB5_LOGIN', False):
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^krb5-login/', shib_login, name="krb5_login"),
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2024-10-15 13:52:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
if getattr(settings, 'ENABLE_LOGIN_SIMPLE_CHECK', False):
|
|
|
|
urlpatterns += [
|
|
|
|
re_path(r'^sso-auto-login/', login_simple_check),
|
|
|
|
]
|
2015-11-17 14:41:10 +08:00
|
|
|
|
2013-05-28 12:13:10 +08:00
|
|
|
# serve office converter static files
|
2019-11-23 19:06:12 +08:00
|
|
|
from seahub.utils import HAS_OFFICE_CONVERTER
|
2013-05-28 12:13:10 +08:00
|
|
|
if HAS_OFFICE_CONVERTER:
|
2015-07-14 17:22:27 +08:00
|
|
|
from seahub.views.file import (
|
2019-11-23 19:06:12 +08:00
|
|
|
office_convert_query_status, office_convert_get_page
|
2015-07-14 17:22:27 +08:00
|
|
|
)
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^office-convert/static/(?P<repo_id>[-0-9a-f]{36})/(?P<commit_id>[0-9a-f]{40})/(?P<path>.+)/(?P<filename>[^/].+)$',
|
2019-11-23 19:06:12 +08:00
|
|
|
office_convert_get_page, name='office_convert_get_page'),
|
2023-06-12 09:53:31 +08:00
|
|
|
path('office-convert/status/', office_convert_query_status, name='office_convert_query_status'),
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2014-02-26 18:24:34 +08:00
|
|
|
|
2022-12-26 09:56:51 +08:00
|
|
|
if getattr(settings, 'ENABLE_MULTI_ADFS', False):
|
2023-03-09 09:55:02 +08:00
|
|
|
from seahub.adfs_auth.views import *
|
2022-12-26 09:56:51 +08:00
|
|
|
urlpatterns += [
|
2024-01-12 12:06:28 +08:00
|
|
|
re_path(r'^multi_adfs_sso/$', multi_adfs_sso, name='multi_adfs_sso'),
|
|
|
|
re_path(r'^org/custom/(?P<org_id>\d+)/saml2/login/$', login, name='org_saml2_login'),
|
|
|
|
re_path(r'^org/custom/(?P<org_id>\d+)/saml2/acs/$', assertion_consumer_service, name='org_saml2_acs'),
|
|
|
|
re_path(r'^org/custom/(?P<org_id>\d+)/saml2/metadata/$', metadata, name='org_saml2_metadata'),
|
|
|
|
re_path(r'^org/custom/(?P<org_id>\d+)/saml2/connect/$', saml2_connect, name='org_saml2_connect'),
|
|
|
|
re_path(r'^org/custom/(?P<org_id>\d+)/saml2/disconnect/$', saml2_disconnect, name='org_saml2_disconnect'),
|
2024-05-25 12:20:30 +08:00
|
|
|
re_path(r'^org/custom/(?P<org_id>\d+)/saml2/ls/$', SamlLogoutView.as_view(), name='org_saml2_ls'),
|
|
|
|
re_path(r'^org/custom/(?P<org_id>\d+)/saml2/ls/post/$', SamlLogoutView.as_view(), name='org_saml2_ls_post'),
|
2024-01-12 12:06:28 +08:00
|
|
|
re_path(r'^org/custom/(?P<org_id>\d+)/saml2/', include(('djangosaml2.urls', 'djangosaml2'), namespace='org')),
|
|
|
|
re_path(r'^org/custom/(?P<url_prefix>[a-z_0-9-]+)/saml2/login/$', adfs_compatible_view, name='login_compatible_view'),
|
|
|
|
re_path(r'^org/custom/(?P<url_prefix>[a-z_0-9-]+)/saml2/acs/$', adfs_compatible_view, name='acs_compatible_view'),
|
|
|
|
re_path(r'^org/custom/(?P<url_prefix>[a-z_0-9-]+)/saml2/metadata/$', adfs_compatible_view, name='metadate_compatible_view'),
|
|
|
|
re_path(r'^org/custom/(?P<url_prefix>[a-z_0-9-]+)/saml2/ls/$', adfs_compatible_view, name='ls_compatible_view'),
|
|
|
|
re_path(r'^org/custom/(?P<url_prefix>[a-z_0-9-]+)/saml2/ls/post/$', adfs_compatible_view, name='ls_post_compatible_view'),
|
2022-12-26 09:56:51 +08:00
|
|
|
]
|
|
|
|
|
2016-12-15 16:34:24 +08:00
|
|
|
if getattr(settings, 'ENABLE_ADFS_LOGIN', False):
|
2023-03-09 09:55:02 +08:00
|
|
|
from seahub.adfs_auth.views import *
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
path('saml2/login/', login, name='saml2_login'),
|
|
|
|
path('saml2/acs/', assertion_consumer_service, name='saml2_acs'),
|
|
|
|
path('saml2/metadata/', metadata, name='saml2_metadata'),
|
2024-01-12 12:06:28 +08:00
|
|
|
path('saml2/connect/', saml2_connect, name='saml2_connect'),
|
|
|
|
path('saml2/disconnect/', saml2_disconnect, name='saml2_disconnect'),
|
2023-06-12 09:53:31 +08:00
|
|
|
path('saml2/', include('djangosaml2.urls')),
|
2023-03-09 09:55:02 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
if getattr(settings, 'ENABLE_MULTI_ADFS', False) or getattr(settings, 'ENABLE_ADFS_LOGIN', False):
|
|
|
|
from seahub.adfs_auth.views import auth_complete
|
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
path('saml2/complete/', auth_complete, name='saml2_complete'),
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2017-03-31 14:41:11 +08:00
|
|
|
|
|
|
|
if getattr(settings, 'ENABLE_ONLYOFFICE', False):
|
2018-02-06 17:36:04 +08:00
|
|
|
urlpatterns += [
|
2024-03-26 10:24:47 +08:00
|
|
|
path('onlyoffice/', include('seahub.onlyoffice.urls')),
|
|
|
|
path('onlyoffice-api/', include('seahub.onlyoffice.api_urls')),
|
2018-02-06 17:36:04 +08:00
|
|
|
]
|
2018-04-11 12:04:22 +08:00
|
|
|
|
2019-04-25 13:12:28 +08:00
|
|
|
|
2018-04-11 12:04:22 +08:00
|
|
|
if getattr(settings, 'ENABLE_CAS', False):
|
2021-08-26 13:37:28 +08:00
|
|
|
from seahub.django_cas_ng.views import login as cas_login
|
|
|
|
from seahub.django_cas_ng.views import logout as cas_logout
|
|
|
|
from seahub.django_cas_ng.views import callback as cas_callback
|
2018-04-11 12:04:22 +08:00
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
path('accounts/cas-login/', cas_login, name='cas_ng_login'),
|
|
|
|
path('accounts/cas-logout/', cas_logout, name='cas_ng_logout'),
|
|
|
|
path('accounts/cas-callback/', cas_callback, name='cas_ng_proxy_callback'),
|
2018-04-11 12:04:22 +08:00
|
|
|
]
|
2023-03-19 20:47:15 +08:00
|
|
|
|
|
|
|
if getattr(settings, 'ENABLE_SEADOC', False):
|
|
|
|
urlpatterns += [
|
2023-06-12 09:53:31 +08:00
|
|
|
re_path(r'^api/v2.1/seadoc/', include('seahub.seadoc.urls')),
|
2023-03-19 20:47:15 +08:00
|
|
|
]
|
2023-10-21 11:38:12 +08:00
|
|
|
|
2023-12-19 15:50:02 +08:00
|
|
|
|
|
|
|
if getattr(settings, 'CLIENT_SSO_VIA_LOCAL_BROWSER', False):
|
|
|
|
urlpatterns += [
|
|
|
|
re_path(r'^client-sso/(?P<token>[^/]+)/$', client_sso, name="client_sso"),
|
|
|
|
re_path(r'^client-sso/(?P<token>[^/]+)/complete/$', client_sso_complete, name="client_sso_complete"),
|
|
|
|
]
|
2024-05-17 11:14:55 +08:00
|
|
|
|
|
|
|
if getattr(settings, 'ENABLE_SUBSCRIPTION', False):
|
|
|
|
urlpatterns += [
|
|
|
|
re_path(r'^subscription/', include('seahub.subscription.urls')),
|
|
|
|
re_path(r'^api/v2.1/subscription/$', SubscriptionView.as_view(), name='api-v2.1-subscription'),
|
|
|
|
re_path(r'^api/v2.1/subscription/plans/$', SubscriptionPlansView.as_view(), name='api-v2.1-subscription-plans'),
|
|
|
|
re_path(r'^api/v2.1/subscription/logs/$', SubscriptionLogsView.as_view(), name='api-v2.1-subscription-logs'),
|
|
|
|
]
|
2024-06-14 15:47:44 +08:00
|
|
|
|
|
|
|
if settings.ENABLE_METADATA_MANAGEMENT:
|
|
|
|
urlpatterns += [
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/$', MetadataManage.as_view(), name='api-v2.1-metadata'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/records/$', MetadataRecords.as_view(), name='api-v2.1-metadata-records'),
|
2024-07-05 15:13:26 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/record/$', MetadataRecordInfo.as_view(), name='api-v2.1-metadata-record-info'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/columns/$', MetadataColumns.as_view(), name='api-v2.1-metadata-columns'),
|
2024-07-22 09:45:08 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/views/$', MetadataViews.as_view(), name='api-v2.1-metadata-views'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/views/(?P<view_id>[-0-9a-zA-Z]{4})/$', MetadataViewsDetailView.as_view(), name='api-v2.1-metadata-views-detail'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/move-views/$', MetadataViewsMoveView.as_view(), name='api-v2.1-metadata-views-move'),
|
2024-08-28 16:06:47 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/duplicate-view/$', MetadataViewsDuplicateView.as_view(), name='api-v2.1-metadata-view-duplicate'),
|
2024-10-16 11:09:30 +08:00
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/face-record/$', FacesRecord.as_view(), name='api-v2.1-metadata-face-record'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/face-records/$', FacesRecords.as_view(), name='api-v2.1-metadata-face-records'),
|
|
|
|
re_path(r'^api/v2.1/repos/(?P<repo_id>[-0-9a-f]{36})/metadata/face-recognition/$', FaceRecognitionManage.as_view(), name='api-v2.1-metadata-face-recognition'),
|
2024-06-14 15:47:44 +08:00
|
|
|
]
|
2024-08-30 14:36:52 +08:00
|
|
|
|
|
|
|
# ai API
|
|
|
|
urlpatterns += [
|
|
|
|
re_path(r'^api/v2.1/ai/image-caption/$', ImageCaption.as_view(), name='api-v2.1-image-caption'),
|
|
|
|
re_path(r'^api/v2.1/ai/generate-summary/$', GenerateSummary.as_view(), name='api-v2.1-generate-summary'),
|
|
|
|
]
|