From 388cd7cca3a3e0881ff69a3b3197b358ca83fa2a Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Fri, 23 May 2014 11:43:00 +0200 Subject: [PATCH] MT#7175 Skip collection in doc if role unspecified --- lib/NGCP/Panel/Controller/API/Root.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Controller/API/Root.pm b/lib/NGCP/Panel/Controller/API/Root.pm index 62d6d41742..c75990e8ea 100644 --- a/lib/NGCP/Panel/Controller/API/Root.pm +++ b/lib/NGCP/Panel/Controller/API/Root.pm @@ -60,7 +60,7 @@ sub GET : Allow { if(ref $role eq "ARRAY") { next unless grep @{ $role }, $c->user->roles; } else { - next unless $role eq $c->user->roles; + next unless $role && $role eq $c->user->roles; } my $query_params = [];