mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-13 05:26:47 +00:00
🚧 fix(association): update authorization check for project proposal based on currentPleb membership and pubkey
This commit is contained in:
@@ -35,7 +35,10 @@ on([
|
||||
'nostrLoggedIn' => function ($pubkey) {
|
||||
$this->currentPubkey = $pubkey;
|
||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
||||
if ($this->currentPleb->id !== $this->projectProposal->einundzwanzig_pleb_id) {
|
||||
if (
|
||||
$this->currentPleb->id !== $this->projectProposal->einundzwanzig_pleb_id
|
||||
|| !in_array($this->currentPleb->npub, config('einundzwanzig.config.current_board'), true)
|
||||
) {
|
||||
return $this->js('alert("Du bist hierzu nicht berechtigt.")');
|
||||
}
|
||||
$this->isAllowed = true;
|
||||
|
||||
Reference in New Issue
Block a user