mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
Allow viewing encrypted repo directory/file.
This commit is contained in:
@@ -8,8 +8,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="side fright">
|
<div class="side fright">
|
||||||
{% if not repo.props.encrypted %}
|
{% if is_owner or repo_ap == 'public' or share_to_me %}
|
||||||
{% if is_owner or repo_ap == 'public' or share_to_me %}
|
|
||||||
<div class="latest-commit">
|
<div class="latest-commit">
|
||||||
<h3>修改信息</h3>
|
<h3>修改信息</h3>
|
||||||
<p>{{ current_commit.props.desc|translate_commit_desc }}</p>
|
<p>{{ current_commit.props.desc|translate_commit_desc }}</p>
|
||||||
@@ -24,7 +23,6 @@
|
|||||||
<span class="time">{{ current_commit.props.ctime|translate_commit_time }}</span>
|
<span class="time">{{ current_commit.props.ctime|translate_commit_time }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h3>操作</h3>
|
<h3>操作</h3>
|
||||||
<ul class="with-bg">
|
<ul class="with-bg">
|
||||||
@@ -33,12 +31,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main fleft">
|
<div class="main fleft">
|
||||||
{% if repo.props.encrypted %}
|
{% if not is_owner and repo_ap == 'own' and not share_to_me %}
|
||||||
<p class="access-notice">该同步目录已加密,不能在线查看。</p>
|
|
||||||
{% else %}
|
|
||||||
{% if not is_owner and repo_ap == 'own' and not share_to_me %}
|
|
||||||
<p class="access-notice">该同步目录web匿名访问未开启,不能在线查看。</p>
|
<p class="access-notice">该同步目录web匿名访问未开启,不能在线查看。</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="path">当前路径:
|
<p class="path">当前路径:
|
||||||
{% for name, link in zipped %}
|
{% for name, link in zipped %}
|
||||||
{% if not forloop.last %}
|
{% if not forloop.last %}
|
||||||
@@ -77,7 +72,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
1
views.py
1
views.py
@@ -344,7 +344,6 @@ def repo_history_dir(request, repo_id):
|
|||||||
zipped = []
|
zipped = []
|
||||||
dir_list = []
|
dir_list = []
|
||||||
file_list = []
|
file_list = []
|
||||||
if not repo.props.encrypted:
|
|
||||||
path = request.GET.get('p', '/')
|
path = request.GET.get('p', '/')
|
||||||
if path[-1] != '/':
|
if path[-1] != '/':
|
||||||
path = path + '/'
|
path = path + '/'
|
||||||
|
Reference in New Issue
Block a user