mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-05-20 10:04:53 +00:00
🚀 Refactor: Centralize isBoardMember logic in EinundzwanzigPleb model and replace redundant checks
This commit is contained in:
@@ -37,7 +37,7 @@ trait WithNostrAuth
|
||||
->where('pubkey', $pubkey)
|
||||
->first();
|
||||
|
||||
if ($this->currentPleb && in_array($this->currentPleb->npub, config('einundzwanzig.config.current_board'), true)) {
|
||||
if ($this->currentPleb && $this->currentPleb->isBoardMember()) {
|
||||
$this->canEdit = true;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ trait WithNostrAuth
|
||||
$this->currentPleb = $user->getPleb();
|
||||
$this->isAllowed = true;
|
||||
|
||||
if ($this->currentPleb && in_array($this->currentPleb->npub, config('einundzwanzig.config.current_board'), true)) {
|
||||
if ($this->currentPleb && $this->currentPleb->isBoardMember()) {
|
||||
$this->canEdit = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user