From 80a4f44f05341fdab536fa7513b5753e5759ed02 Mon Sep 17 00:00:00 2001 From: Dedan Date: Fri, 12 Apr 2024 11:14:51 +0300 Subject: [PATCH] Add rights() method to Gateway, Payment, Simulate, Stkpush, and Webhook entities --- Entities/Gateway.php | 6 ++++++ Entities/Payment.php | 6 ++++++ Entities/Simulate.php | 6 ++++++ Entities/Stkpush.php | 6 ++++++ Entities/Webhook.php | 6 ++++++ 5 files changed, 30 insertions(+) diff --git a/Entities/Gateway.php b/Entities/Gateway.php index 735eac5..b9bf110 100755 --- a/Entities/Gateway.php +++ b/Entities/Gateway.php @@ -105,7 +105,13 @@ public function structure($structure): array */ public function rights(): array { + $rights = parent::rights(); + $rights['staff'] = ['view' => true]; + $rights['registered'] = ['view' => true]; + $rights['guest'] = []; + + return $rights; } } diff --git a/Entities/Payment.php b/Entities/Payment.php index 9587f73..bef33c0 100755 --- a/Entities/Payment.php +++ b/Entities/Payment.php @@ -89,6 +89,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; } } diff --git a/Entities/Simulate.php b/Entities/Simulate.php index 0f46fd4..40479d3 100755 --- a/Entities/Simulate.php +++ b/Entities/Simulate.php @@ -82,7 +82,13 @@ public function structure($structure): array */ public function rights(): array { + $rights = parent::rights(); + $rights['staff'] = ['view' => true]; + $rights['registered'] = ['view' => true]; + $rights['guest'] = []; + + return $rights; } } diff --git a/Entities/Stkpush.php b/Entities/Stkpush.php index a70e245..0dc6294 100755 --- a/Entities/Stkpush.php +++ b/Entities/Stkpush.php @@ -91,6 +91,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; } } diff --git a/Entities/Webhook.php b/Entities/Webhook.php index 8944044..3fac6d1 100755 --- a/Entities/Webhook.php +++ b/Entities/Webhook.php @@ -85,6 +85,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; } }