unauthorized limitations

This commit is contained in:
mrilyew 2025-01-17 18:15:17 +03:00
parent 9a817fe12f
commit 758ae66dbe
5 changed files with 12 additions and 9 deletions

View file

@ -28,7 +28,7 @@
</span>{/if}
</div>
</div>
<div class="doc_volume" n:if="!$hideButtons">
<div class="doc_volume" n:if="!$hideButtons && $thisUser">
<div n:if="!$modifiable" id="report_icon"></div>
<div n:if="$modifiable" id="edit_icon"></div>
<div n:if="!$copied || $copied && $copyImportance" id="add_icon"></div>

View file

@ -11,7 +11,7 @@
<img class="docGalleryItem_gif_preview" loading="lazy" src="{$doc->getURL()}" alt="gif photo view">
{/if}
<div class="doc_top_panel doc_shown_by_hover">
<div class="doc_top_panel doc_shown_by_hover" n:if="$thisUser">
<div class="doc_volume_action" n:if="!$modifiable" id="report_icon"></div>
<div class="doc_volume_action" n:if="$modifiable" id="edit_icon"></div>
<div class="doc_volume_action" n:if="!$copied || $copied && $copyImportance" id="add_icon"></div>

View file

@ -43,7 +43,7 @@
</tbody>
</table>
</div>
<div n:if="$club->getFollowersCount() > 0">
<div n:if="$thisUser && $club->getFollowersCount() > 0">
{var $followersCount = $club->getFollowersCount()}
<div class="content_title_expanded" onclick="hidePanel(this, {$followersCount});">
@ -91,7 +91,7 @@
</div>
</div>
<div>
<div n:if="$thisUser">
<div class="content_title_expanded" onclick="hidePanel(this, {$audiosCount});">
{_audios}
</div>
@ -291,7 +291,7 @@
</div>
</div>
</div>
<div n:if="($docsCount > 0 || ($thisUser && $club->canBeModifiedBy($thisUser)))">
<div n:if="($thisUser && $docsCount > 0 || ($thisUser && $club->canBeModifiedBy($thisUser)))">
<div class="content_title_expanded" onclick="hidePanel(this, {$topicsCount});">
{_documents}
</div>

View file

@ -266,6 +266,9 @@ u(document).on("click", ".docListViewItem a.viewerOpener, a.docGalleryItem", asy
if(e.target.closest('.doc_volume_action')) {
return
}
if(window.openvk.current_id == 0) {
return
}
const target = u(e.target)
const link = target.closest('a')

View file

@ -309,10 +309,6 @@ u(document).on('submit', 'form', async (e) => {
return
}
if((localStorage.getItem('ux.disable_ajax_routing') ?? 0) == 1 || window.openvk.current_id == 0) {
return false
}
if(window.openvk.disable_ajax == 1) {
return false
}
@ -322,6 +318,10 @@ u(document).on('submit', 'form', async (e) => {
collect_attachments_node(target)
}
if((localStorage.getItem('ux.disable_ajax_routing') ?? 0) == 1 || window.openvk.current_id == 0) {
return false
}
u('#ajloader').addClass('shown')
const form = e.target