Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
孙永强 committed Oct 25, 2024
1 parent 279cd95 commit f544e5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion seahub/api2/endpoints/internal_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def post(self, request, repo_id):
return Response({'user': rat.app_name})


class InternalDownloadRateLimited(APIView):
class InternalDownloadRateLimitView(APIView):
authentication_classes = (SessionCRSFCheckFreeAuthentication, )

def post(self, request):
Expand Down
8 changes: 4 additions & 4 deletions seahub/role_permissions/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def merge_roles(default, custom):
'can_publish_repo': True,
'upload_rate_limit': 0,
'download_rate_limit': 0,
'monthly_rate_limit': 1000,
'monthly_rate_limit_per_user': 1000
'monthly_rate_limit': 0,
'monthly_rate_limit_per_user': 0
},
GUEST_USER: {
'can_add_repo': False,
Expand All @@ -70,8 +70,8 @@ def merge_roles(default, custom):
'can_publish_repo': False,
'upload_rate_limit': 0,
'download_rate_limit': 0,
'monthly_rate_limit': 1000,
'monthly_rate_limit_per_user': 1000
'monthly_rate_limit': 0,
'monthly_rate_limit_per_user': 0
},
}

Expand Down
4 changes: 2 additions & 2 deletions seahub/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from seahub.ai.apis import ImageCaption, GenerateSummary
from seahub.api2.endpoints.share_link_auth import ShareLinkUserAuthView, ShareLinkEmailAuthView
from seahub.api2.endpoints.internal_api import InternalUserListView, InternalCheckShareLinkAccess, \
InternalCheckFileOperationAccess, InternalDownloadRateLimited
InternalCheckFileOperationAccess, InternalDownloadRateLimitView
from seahub.auth.views import multi_adfs_sso, login_simple_check
from seahub.views import *
from seahub.views.mobile import mobile_login
Expand Down Expand Up @@ -796,7 +796,7 @@
re_path(r'^api/v2.1/internal/user-list/$', InternalUserListView.as_view(), name="api-v2.1-internal-user-list"),
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"),
re_path(r'^api/v2.1/internal/download-limit/$', InternalDownloadRateLimited.as_view(), name='api-v2.1-internal-download-limit'),
re_path(r'^api/v2.1/internal/download-limit/$', InternalDownloadRateLimitView.as_view(), name='api-v2.1-internal-download-limit'),
### system admin ###
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'),
Expand Down

0 comments on commit f544e5b

Please sign in to comment.