Corrected permissions to go with the more logical thought process
This commit is contained in:
parent
820d2bf172
commit
a2a4ab05c8
9 changed files with 20 additions and 20 deletions
|
@ -93,7 +93,7 @@ class LocationTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeNodes(Location $location)
|
public function includeNodes(Location $location)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('location-list')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('node-list')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ class NodeTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeLocation(Node $node)
|
public function includeLocation(Node $node)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('node-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('location-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ class OptionTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeService(ServiceOption $option)
|
public function includeService(ServiceOption $option)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('service-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ class OptionTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includePacks(ServiceOption $option)
|
public function includePacks(ServiceOption $option)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('pack-list')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class OptionTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeServers(ServiceOption $option)
|
public function includeServers(ServiceOption $option)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('server-list')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ class PackTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeOption(Pack $pack)
|
public function includeOption(Pack $pack)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('pack-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ class PackTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeServers(Pack $pack)
|
public function includeServers(Pack $pack)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('pack-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('server-list')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ class ServerTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeUser(Server $server)
|
public function includeUser(Server $server)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('user-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ class ServerTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includePack(Server $server)
|
public function includePack(Server $server)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('pack-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ class ServerTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeService(Server $server)
|
public function includeService(Server $server)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('service-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ class ServerTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeOption(Server $server)
|
public function includeOption(Server $server)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ class ServerTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeLocation(Server $server)
|
public function includeLocation(Server $server)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('location-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ class ServerTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeNode(Server $server)
|
public function includeNode(Server $server)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('node-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ class ServerVariableTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeParent(ServerVariable $variable)
|
public function includeParent(ServerVariable $variable)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ class ServiceTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeOptions(Service $service)
|
public function includeOptions(Service $service)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('service-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('option-list')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ class ServiceTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeServers(Service $service)
|
public function includeServers(Service $service)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('service-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('server-list')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ class ServiceTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includePacks(Service $service)
|
public function includePacks(Service $service)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('service-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('pack-list')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ class ServiceVariableTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeVariables(ServiceVariable $variable)
|
public function includeVariables(ServiceVariable $variable)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('option-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ class UserTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeServers(User $user)
|
public function includeServers(User $user)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('user-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('server-list')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ class UserTransformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
public function includeAccess(User $user)
|
public function includeAccess(User $user)
|
||||||
{
|
{
|
||||||
if ($this->request && ! $this->request->apiKeyHasPermission('user-view')) {
|
if ($this->request && ! $this->request->apiKeyHasPermission('server-list')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue