Skip to content

Commit

Permalink
unauthorized limitations
Browse files Browse the repository at this point in the history
  • Loading branch information
mrilyew committed Jan 17, 2025
1 parent 9a817fe commit 758ae66
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Web/Presenters/templates/Documents/components/doc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion Web/Presenters/templates/Documents/components/image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions Web/Presenters/templates/Group/View.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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});">
Expand Down Expand Up @@ -91,7 +91,7 @@
</div>
</div>

<div>
<div n:if="$thisUser">
<div class="content_title_expanded" onclick="hidePanel(this, {$audiosCount});">
{_audios}
</div>
Expand Down Expand Up @@ -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>
Expand Down
3 changes: 3 additions & 0 deletions Web/static/js/al_docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
8 changes: 4 additions & 4 deletions Web/static/js/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
Expand Down

0 comments on commit 758ae66

Please sign in to comment.