1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-23 12:27:48 +00:00

Remove deprecated code

This commit is contained in:
zhengxie
2014-08-27 10:31:15 +08:00
parent 149002aa86
commit ee10b30bbf
3 changed files with 23 additions and 54 deletions

View File

@@ -29,7 +29,7 @@ from seahub.message.models import UserMessage
from seahub.signals import upload_file_successful, repo_created, repo_deleted
from seahub.views import get_repo_dirents, validate_owner, \
check_repo_access_permission, get_unencry_rw_repos_by_user, \
get_system_default_repo_id, access_to_repo, get_diff, group_events_data, \
get_system_default_repo_id, get_diff, group_events_data, \
get_owned_repo_list
from seahub.views.repo import get_nav_path, get_fileshare, get_dir_share_link, \
@@ -1559,13 +1559,14 @@ def repo_history_changes(request, repo_id):
changes = {}
content_type = 'application/json; charset=utf-8'
if not access_to_repo(request, repo_id, ''):
return HttpResponse(json.dumps(changes), content_type=content_type)
repo = get_repo(repo_id)
if not repo:
return HttpResponse(json.dumps(changes), content_type=content_type)
# perm check
if check_repo_access_permission(repo.id, request.user) is None:
return HttpResponse(json.dumps(changes), content_type=content_type)
username = request.user.username
try:
server_crypto = UserOptions.objects.is_server_crypto(username)