mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 07:41:26 +00:00
Fixed public group wiki bug
This commit is contained in:
@@ -52,7 +52,9 @@
|
||||
<ul class="wiki-nav fleft">
|
||||
<li class="item"><a href="{% url 'group_wiki' group.id %}" class="link">{% trans "Home" %}</a></li>
|
||||
<li class="item"><a href="{% url 'group_wiki_pages' group.id %}" class="link">{% trans "Pages" %}</a></li>
|
||||
{% if group.view_perm != "pub" %}
|
||||
<li class="item"><a href="{% url 'repo_history' repo_id %}" target="_blank" class="link">{% trans "Wiki History" %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if group.view_perm != "pub" %}
|
||||
|
@@ -28,7 +28,9 @@
|
||||
<ul class="wiki-nav fleft">
|
||||
<li class="item"><a href="{% url 'group_wiki' group.id %}" class="link">{% trans "Home" %}</a></li>
|
||||
<li class="item"><a href="{% url 'group_wiki_pages' group.id %}" class="link">{% trans "Pages" %}</a></li>
|
||||
{% if group.view_perm != "pub" %}
|
||||
<li class="item"><a href="{% url 'repo_history' repo_id %}" target="_blank" class="link">{% trans "Wiki History" %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if group.view_perm != "pub" %}
|
||||
<button id="page-create" class="op-btn">{% trans "New Page" %}</button>
|
||||
|
@@ -1194,7 +1194,10 @@ def group_wiki(request, group, page_name="home"):
|
||||
except WikiDoesNotExist:
|
||||
wiki_exists = False
|
||||
except WikiPageMissing:
|
||||
'''create that page for user'''
|
||||
'''create that page for user if he/she is a group member'''
|
||||
if not is_group_user(group.id, username):
|
||||
raise Http404
|
||||
|
||||
repo = find_wiki_repo(request, group)
|
||||
# No need to check whether repo is none, since repo is already created
|
||||
|
||||
|
Reference in New Issue
Block a user