Skip to content

Commit 5a1fe6c

Browse files
committed
minor permission remapping for AlertTransportGroups and AlertOperationSegment
1 parent ab48605 commit 5a1fe6c

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

app/Policies/AlertOperationSegmentPolicy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AlertOperationSegmentPolicy
1717

1818
public function __construct()
1919
{
20-
$this->globalPrefix = 'alert-operation';
20+
$this->globalPrefix = 'alert-rule';
2121
}
2222

2323
public function viewAny(User $user): bool

app/Policies/AlertTransportGroupPolicy.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,19 @@ class AlertTransportGroupPolicy
1111

1212
public function __construct()
1313
{
14-
$this->globalPrefix = 'alert';
14+
$this->globalPrefix = 'alert-transport';
1515
}
1616

1717
public function viewAny(User $user): bool
1818
{
1919
return $this->hasGlobalPermission($user, 'view')
20-
|| $this->hasGlobalPermission($user, 'viewAll')
2120
|| $this->hasGlobalPermission($user, 'create')
2221
|| $this->hasGlobalPermission($user, 'update')
2322
|| $this->hasGlobalPermission($user, 'delete');
2423
}
2524

26-
public function viewAll(User $user): bool
27-
{
28-
return $this->hasGlobalPermission($user, 'viewAll');
29-
}
30-
3125
public function view(User $user, AlertTransportGroup $group): bool
3226
{
33-
if ($this->hasGlobalPermission($user, 'viewAll')) {
34-
return true;
35-
}
36-
3727
return $this->hasGlobalPermission($user, 'view');
3828
}
3929

0 commit comments

Comments
 (0)