refactor: streamline user role checks and improve JWT token handling

This commit is contained in:
2025-12-30 11:48:29 -05:00
parent 7857c327ea
commit 2fe2ce2f3a
4 changed files with 80 additions and 68 deletions
@@ -523,10 +523,7 @@
<span class="text-neutral-300">Download</span>
</button>
{#if $user && ($user.uuid === data.paste?.author?.uuid || ['1', '255'].some( (r) => $user.roles
.toString()
.split(',')
.includes(r) ))}
{#if $user && ($user.uuid === data.paste?.author?.uuid || $user.roles.some((r) => r === 1 || r === 255))}
{#if !editing}
<button
type="button"