Skip to content

Commit a2a4ab0

Browse files
committed
Corrected permissions to go with the more logical thought process
1 parent 820d2bf commit a2a4ab0

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

app/Transformers/Admin/LocationTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function includeServers(Location $location)
9393
*/
9494
public function includeNodes(Location $location)
9595
{
96-
if ($this->request && ! $this->request->apiKeyHasPermission('location-list')) {
96+
if ($this->request && ! $this->request->apiKeyHasPermission('node-list')) {
9797
return;
9898
}
9999

app/Transformers/Admin/NodeTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function includeAllocations(Node $node)
9494
*/
9595
public function includeLocation(Node $node)
9696
{
97-
if ($this->request && ! $this->request->apiKeyHasPermission('node-view')) {
97+
if ($this->request && ! $this->request->apiKeyHasPermission('location-view')) {
9898
return;
9999
}
100100

app/Transformers/Admin/OptionTransformer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function transform(ServiceOption $option)
8181
*/
8282
public function includeService(ServiceOption $option)
8383
{
84-
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
84+
if ($this->request && ! $this->request->apiKeyHasPermission('service-view')) {
8585
return;
8686
}
8787

@@ -95,7 +95,7 @@ public function includeService(ServiceOption $option)
9595
*/
9696
public function includePacks(ServiceOption $option)
9797
{
98-
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
98+
if ($this->request && ! $this->request->apiKeyHasPermission('pack-list')) {
9999
return;
100100
}
101101

@@ -109,7 +109,7 @@ public function includePacks(ServiceOption $option)
109109
*/
110110
public function includeServers(ServiceOption $option)
111111
{
112-
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
112+
if ($this->request && ! $this->request->apiKeyHasPermission('server-list')) {
113113
return;
114114
}
115115

app/Transformers/Admin/PackTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function transform($pack)
8383
*/
8484
public function includeOption(Pack $pack)
8585
{
86-
if ($this->request && ! $this->request->apiKeyHasPermission('pack-view')) {
86+
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
8787
return;
8888
}
8989

@@ -97,7 +97,7 @@ public function includeOption(Pack $pack)
9797
*/
9898
public function includeServers(Pack $pack)
9999
{
100-
if ($this->request && ! $this->request->apiKeyHasPermission('pack-view')) {
100+
if ($this->request && ! $this->request->apiKeyHasPermission('server-list')) {
101101
return;
102102
}
103103

app/Transformers/Admin/ServerTransformer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function includeSubusers(Server $server)
114114
*/
115115
public function includeUser(Server $server)
116116
{
117-
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
117+
if ($this->request && ! $this->request->apiKeyHasPermission('user-view')) {
118118
return;
119119
}
120120

@@ -128,7 +128,7 @@ public function includeUser(Server $server)
128128
*/
129129
public function includePack(Server $server)
130130
{
131-
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
131+
if ($this->request && ! $this->request->apiKeyHasPermission('pack-view')) {
132132
return;
133133
}
134134

@@ -142,7 +142,7 @@ public function includePack(Server $server)
142142
*/
143143
public function includeService(Server $server)
144144
{
145-
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
145+
if ($this->request && ! $this->request->apiKeyHasPermission('service-view')) {
146146
return;
147147
}
148148

@@ -156,7 +156,7 @@ public function includeService(Server $server)
156156
*/
157157
public function includeOption(Server $server)
158158
{
159-
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
159+
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
160160
return;
161161
}
162162

@@ -184,7 +184,7 @@ public function includeVariables(Server $server)
184184
*/
185185
public function includeLocation(Server $server)
186186
{
187-
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
187+
if ($this->request && ! $this->request->apiKeyHasPermission('location-view')) {
188188
return;
189189
}
190190

@@ -198,7 +198,7 @@ public function includeLocation(Server $server)
198198
*/
199199
public function includeNode(Server $server)
200200
{
201-
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
201+
if ($this->request && ! $this->request->apiKeyHasPermission('node-view')) {
202202
return;
203203
}
204204

app/Transformers/Admin/ServerVariableTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function transform(ServerVariable $variable)
7676
*/
7777
public function includeParent(ServerVariable $variable)
7878
{
79-
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
79+
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
8080
return;
8181
}
8282

app/Transformers/Admin/ServiceTransformer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function transform(Service $service)
8080
*/
8181
public function includeOptions(Service $service)
8282
{
83-
if ($this->request && ! $this->request->apiKeyHasPermission('service-view')) {
83+
if ($this->request && ! $this->request->apiKeyHasPermission('option-list')) {
8484
return;
8585
}
8686

@@ -94,7 +94,7 @@ public function includeOptions(Service $service)
9494
*/
9595
public function includeServers(Service $service)
9696
{
97-
if ($this->request && ! $this->request->apiKeyHasPermission('service-view')) {
97+
if ($this->request && ! $this->request->apiKeyHasPermission('server-list')) {
9898
return;
9999
}
100100

@@ -108,7 +108,7 @@ public function includeServers(Service $service)
108108
*/
109109
public function includePacks(Service $service)
110110
{
111-
if ($this->request && ! $this->request->apiKeyHasPermission('service-view')) {
111+
if ($this->request && ! $this->request->apiKeyHasPermission('pack-list')) {
112112
return;
113113
}
114114

app/Transformers/Admin/ServiceVariableTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function transform(ServiceVariable $variable)
7676
*/
7777
public function includeVariables(ServiceVariable $variable)
7878
{
79-
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
79+
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
8080
return;
8181
}
8282

app/Transformers/Admin/UserTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function transform(User $user)
7979
*/
8080
public function includeServers(User $user)
8181
{
82-
if ($this->request && ! $this->request->apiKeyHasPermission('user-view')) {
82+
if ($this->request && ! $this->request->apiKeyHasPermission('server-list')) {
8383
return;
8484
}
8585

@@ -93,7 +93,7 @@ public function includeServers(User $user)
9393
*/
9494
public function includeAccess(User $user)
9595
{
96-
if ($this->request && ! $this->request->apiKeyHasPermission('user-view')) {
96+
if ($this->request && ! $this->request->apiKeyHasPermission('server-list')) {
9797
return;
9898
}
9999

0 commit comments

Comments
 (0)