Skip to content

Commit

Permalink
Add rights() method to Airtime, Number, Phone, Prefix, and Provider m…
Browse files Browse the repository at this point in the history
…odels
  • Loading branch information
dedanirungu committed Apr 12, 2024
1 parent 8667e1f commit d50e00b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Entities/Airtime.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ public function structure($structure): array
*/
public function rights(): array
{
$rights = parent::rights();

$rights['staff'] = ['view' => true];
$rights['registered'] = ['view' => true];
$rights['guest'] = [];

return $rights;
}
}
6 changes: 6 additions & 0 deletions Entities/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ public function structure($structure): array
*/
public function rights(): array
{
$rights = parent::rights();

$rights['staff'] = ['view' => true];
$rights['registered'] = [];
$rights['guest'] = [];

return $rights;
}
}
6 changes: 6 additions & 0 deletions Entities/Phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public function structure($structure): array
*/
public function rights(): array
{
$rights = parent::rights();

$rights['staff'] = ['view' => true];
$rights['registered'] = ['view' => true];
$rights['guest'] = [];

return $rights;
}
}
6 changes: 6 additions & 0 deletions Entities/Prefix.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ public function structure($structure): array
*/
public function rights(): array
{
$rights = parent::rights();

$rights['staff'] = ['view' => true];
$rights['registered'] = [];
$rights['guest'] = [];

return $rights;
}
}
6 changes: 6 additions & 0 deletions Entities/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ public function structure($structure): array
*/
public function rights(): array
{
$rights = parent::rights();

$rights['staff'] = ['view' => true];
$rights['registered'] = ['view' => true];
$rights['guest'] = [];

return $rights;
}
}

0 comments on commit d50e00b

Please sign in to comment.