Skip to content

Commit

Permalink
update (#6253)
Browse files Browse the repository at this point in the history
  • Loading branch information
r350178982 authored Jun 24, 2024
1 parent 2694bff commit 58512dd
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions seahub/api2/endpoints/custom_share_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ def get(self, request, repo_id):
"""List custom share permissions
"""
# permission check
if not request.user.permissions.can_share_repo():
return api_error(status.HTTP_403_FORBIDDEN, 'Permission denied.')

if not check_folder_permission(request, repo_id, '/'):
error_msg = 'Permission denied.'
return api_error(status.HTTP_403_FORBIDDEN, error_msg)
Expand Down Expand Up @@ -104,9 +101,6 @@ def get(self, request, repo_id, permission_id):
"""get a custom share permission
"""
# permission check
if not request.user.permissions.can_share_repo():
return api_error(status.HTTP_403_FORBIDDEN, 'Permission denied.')

if not check_folder_permission(request, repo_id, '/'):
error_msg = 'Permission denied.'
return api_error(status.HTTP_403_FORBIDDEN, error_msg)
Expand Down
3 changes: 0 additions & 3 deletions seahub/api2/endpoints/dir_shared_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,6 @@ def has_shared_to_group(self, request, repo_id, path, group_id):
def get(self, request, repo_id, format=None):
"""List shared items(shared to users/groups) for a folder/library.
"""
if not request.user.permissions.can_share_repo():
return api_error(status.HTTP_403_FORBIDDEN, 'Permission denied.')

repo = seafile_api.get_repo(repo_id)
if not repo:
return api_error(status.HTTP_404_NOT_FOUND, 'Library %s not found.' % repo_id)
Expand Down
3 changes: 0 additions & 3 deletions seahub/api2/endpoints/shared_folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ def get(self, request, format=None):
Permission checking:
1. all authenticated user can perform this action.
"""
if not request.user.permissions.can_share_repo():
return api_error(status.HTTP_403_FORBIDDEN, 'Permission denied.')

shared_repos = []
username = request.user.username

Expand Down
3 changes: 0 additions & 3 deletions seahub/api2/endpoints/shared_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ def get(self, request, format=None):
Permission checking:
1. all authenticated user can perform this action.
"""
if not request.user.permissions.can_share_repo():
return api_error(status.HTTP_403_FORBIDDEN, 'Permission denied.')

shared_repos = []
username = request.user.username
try:
Expand Down

0 comments on commit 58512dd

Please sign in to comment.