1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 20:08:19 +00:00

[lib view] show error msg, added decryption for enc-lib, cleaned up some code

This commit is contained in:
llj
2015-03-23 18:11:24 +08:00
committed by Daniel Pan
parent 89bba63408
commit c892ee3afa
7 changed files with 77 additions and 52 deletions

View File

@@ -424,7 +424,7 @@ def list_lib_dir(request, repo_id):
if repo.encrypted \
and not seafile_api.is_password_set(repo.id, username):
err_msg = _(u'Library is encrypted.')
return HttpResponse(json.dumps({'error': err_msg}),
return HttpResponse(json.dumps({'error': err_msg, 'lib_need_decrypt': True}),
status=403, content_type=content_type)
head_commit = get_commit(repo.id, repo.version, repo.head_cmmt_id)