mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: limit ViewRecord
This commit is contained in:
1 parent
63894f9959
commit
77fc46c069
17 files changed
+37
-30
No files matched your search
@@ -73,7 +73,7 @@
|
||||
<span class="icon icon-edit"></span> {{ _('Edit Contest') }}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
{% if handler.user.hasPriv(PRIV.PRIV_READ_RECORD_CODE) or handler.user.hasPerm(perm.PERM_READ_RECORD_CODE) %}
|
||||
{% if handler.user.own(tdoc) or handler.user.hasPriv(PRIV.PRIV_READ_RECORD) or handler.user.hasPerm(perm.PERM_READ_RECORD) %}
|
||||
{% if model.contest.canShowRecord.call(handler, tdoc, true) %}
|
||||
<li class="menu__item"><a class="menu__link" href="{{ url('contest_code', tid=tdoc.docId) }}">
|
||||
<span class="icon icon-download"></span> {{ _('Export All Code') }}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<span class="icon icon-edit"></span> {{ _('Edit Homework') }}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
{% if handler.user.hasPriv(PRIV.PRIV_READ_RECORD_CODE) or handler.user.hasPerm(perm.PERM_READ_RECORD_CODE) %}
|
||||
{% if handler.user.own(tdoc) or handler.user.hasPriv(PRIV.PRIV_READ_RECORD) or handler.user.hasPerm(perm.PERM_READ_RECORD) %}
|
||||
<li class="menu__item"><a class="menu__link" href="{{ url('homework_code', tid=tdoc.docId) }}">
|
||||
<span class="icon icon-download"></span> {{ _('Export All Code') }}
|
||||
</a></li>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<ol class="nav__list nav__list--main clearfix">
|
||||
<li class="nav__list-item"><a href="/" class="nav__logo" style="background-size: 100% 100%;"> </a></li>
|
||||
{%- for item in ui.nodes.nav -%}{% if item.checker(handler) %}
|
||||
{{ nav_item(item.name, item.args, item.prefix) }}
|
||||
{{ nav_item(item.name, item.args(handler), item.prefix) }}
|
||||
{% endif %}{%- endfor -%}
|
||||
</ol>
|
||||
<ol class="nav__list nav__list--secondary clearfix">
|
||||
|
||||
Reference in new issue
Block a user