mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-13 05:26:47 +00:00
🚫 fix(permissions): update unauthorized access alerts for member and election management pages
This commit is contained in:
@@ -59,7 +59,7 @@ on([
|
|||||||
$this->currentPubkey = $pubkey;
|
$this->currentPubkey = $pubkey;
|
||||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
||||||
if ($this->currentPleb->association_status->value < 3) {
|
if ($this->currentPleb->association_status->value < 3) {
|
||||||
return redirect()->route('association.profile');
|
return $this->js('alert("Du bist nicht berechtigt, an der Wahl teilzunehmen.")');
|
||||||
}
|
}
|
||||||
$logPubkeys = [
|
$logPubkeys = [
|
||||||
'0adf67475ccc5ca456fd3022e46f5d526eb0af6284bf85494c0dd7847f3e5033',
|
'0adf67475ccc5ca456fd3022e46f5d526eb0af6284bf85494c0dd7847f3e5033',
|
||||||
|
|||||||
@@ -74,9 +74,8 @@ on([
|
|||||||
'0adf67475ccc5ca456fd3022e46f5d526eb0af6284bf85494c0dd7847f3e5033',
|
'0adf67475ccc5ca456fd3022e46f5d526eb0af6284bf85494c0dd7847f3e5033',
|
||||||
'430169631f2f0682c60cebb4f902d68f0c71c498fd1711fd982f052cf1fd4279',
|
'430169631f2f0682c60cebb4f902d68f0c71c498fd1711fd982f052cf1fd4279',
|
||||||
],
|
],
|
||||||
!in_array($this->currentPubkey, $allowedPubkeys, true) ? redirect()->route(
|
!in_array($this->currentPubkey, $allowedPubkeys, true) ?
|
||||||
'association.profile',
|
$this->js('alert("Du bist hierzu nicht berechtigt.")') : $this->isAllowed = true,
|
||||||
) : $this->isAllowed = true,
|
|
||||||
],
|
],
|
||||||
'echo:votes,.newVote' => fn()
|
'echo:votes,.newVote' => fn()
|
||||||
=> [
|
=> [
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ on([
|
|||||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()
|
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()
|
||||||
->where('pubkey', $pubkey)->first();
|
->where('pubkey', $pubkey)->first();
|
||||||
if ($this->currentPubkey !== '0adf67475ccc5ca456fd3022e46f5d526eb0af6284bf85494c0dd7847f3e5033') {
|
if ($this->currentPubkey !== '0adf67475ccc5ca456fd3022e46f5d526eb0af6284bf85494c0dd7847f3e5033') {
|
||||||
return redirect()->route('association.profile');
|
return $this->js('alert("Du bist nicht berechtigt, Wahlen zu bearbeiten.")');
|
||||||
}
|
}
|
||||||
$this->isAllowed = true;
|
$this->isAllowed = true;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ on([
|
|||||||
'430169631f2f0682c60cebb4f902d68f0c71c498fd1711fd982f052cf1fd4279',
|
'430169631f2f0682c60cebb4f902d68f0c71c498fd1711fd982f052cf1fd4279',
|
||||||
];
|
];
|
||||||
if (!in_array($this->currentPubkey, $allowedPubkeys, true)) {
|
if (!in_array($this->currentPubkey, $allowedPubkeys, true)) {
|
||||||
return redirect()->route('association.profile');
|
return $this->js('alert("Du bist nicht berechtigt, Mitglieder zu bearbeiten.")');
|
||||||
}
|
}
|
||||||
$this->isAllowed = true;
|
$this->isAllowed = true;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user