Bezbednost: ispravke kontrole pristupa u admin i handler sloju

This commit is contained in:
2026-06-05 22:41:20 +02:00
parent ccc08aee08
commit 2b3636528f
44 changed files with 1310 additions and 480 deletions
+6 -23
View File
@@ -4,13 +4,7 @@
{{define "dodatni-css"}}
<style>
.greska-animacija {
animation: shake 0.4s ease;
}
@media (max-width: 768px) {
.forma-grid-2 { grid-template-columns: 1fr !important; }
}
.greska-animacija { animation: shake 0.4s ease; }
</style>
{{end}}
@@ -18,10 +12,8 @@
<div style="width:100%;">
<!-- nazad dugme -->
<a href="/klijenti"
style="display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--tekst-sporedni);text-decoration:none;margin-bottom:20px;transition:color 0.2s;"
onmouseover="this.style.color='var(--tekst-glavni)'" onmouseout="this.style.color='var(--tekst-sporedni)'">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"/></svg>
<a href="/klijenti" class="nazad-link">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 18 9 12 15 6"/></svg>
Nazad na klijente
</a>
@@ -33,10 +25,7 @@
</div>
{{if .Greska}}
<div class="greska-animacija"
style="background:var(--kartica);border:0.5px solid #dc2626;border-radius:8px;padding:10px 14px;margin-bottom:16px;font-size:13px;color:#dc2626;">
{{.Greska}}
</div>
<div class="poruka-greska greska-animacija">{{.Greska}}</div>
{{end}}
<form method="POST" action="{{if .Izmena}}/klijenti/izmeni/{{.Klijent.ID}}{{else}}/klijenti/novi{{end}}">
@@ -120,14 +109,8 @@
<!-- dugmad -->
<div style="display:flex;justify-content:flex-end;gap:10px;margin-top:6px;">
<a href="/klijenti"
style="padding:9px 20px;border:0.5px solid var(--ivica);border-radius:8px;font-size:14px;color:var(--tekst-sporedni);text-decoration:none;transition:background 0.2s;"
onmouseover="this.style.background='var(--pozadina)'" onmouseout="this.style.background=''">
Odustani
</a>
<button type="submit"
style="padding:9px 20px;background:var(--sb-akcent);color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:opacity 0.2s;"
onmouseover="this.style.opacity='0.85'" onmouseout="this.style.opacity='1'">
<a href="/klijenti" class="btn-sekundarno">Odustani</a>
<button type="submit" class="btn-primarno">
{{if .Izmena}}Sačuvaj izmene{{else}}Dodaj klijenta{{end}}
</button>
</div>