From c0e4a4bb98c7930e8e8fb20c43793758c1efe5d9 Mon Sep 17 00:00:00 2001 From: fsociety Date: Tue, 1 Oct 2024 14:42:13 +0200 Subject: [PATCH] feat: change conditional checks for association status and public key Swapped the conditional check for association status and public key in both admin.blade.php and index.blade.php. This change ensures that the correct condition is evaluated in the respective files. --- resources/views/pages/association/election/index.blade.php | 2 +- resources/views/pages/association/members/admin.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/pages/association/election/index.blade.php b/resources/views/pages/association/election/index.blade.php index 5563acc..4f3f374 100644 --- a/resources/views/pages/association/election/index.blade.php +++ b/resources/views/pages/association/election/index.blade.php @@ -28,7 +28,7 @@ on([ $this->currentPubkey = $pubkey; $this->currentPleb = \App\Models\EinundzwanzigPleb::query() ->where('pubkey', $pubkey)->first(); - if($this->currentPleb->association_status->value < 3) { + if ($this->currentPubkey !== '0adf67475ccc5ca456fd3022e46f5d526eb0af6284bf85494c0dd7847f3e5033') { return redirect()->route('association.profile'); } $this->isAllowed = true; diff --git a/resources/views/pages/association/members/admin.blade.php b/resources/views/pages/association/members/admin.blade.php index 3b31504..6762f9b 100644 --- a/resources/views/pages/association/members/admin.blade.php +++ b/resources/views/pages/association/members/admin.blade.php @@ -22,7 +22,7 @@ on([ $this->currentPubkey = $pubkey; $this->currentPleb = \App\Models\EinundzwanzigPleb::query() ->where('pubkey', $pubkey)->first(); - if($this->currentPubkey !== '0adf67475ccc5ca456fd3022e46f5d526eb0af6284bf85494c0dd7847f3e5033') { + if($this->currentPleb->association_status->value < 3) { return redirect()->route('association.profile'); } $this->isAllowed = true;