diff --git a/lib/NGCP/Panel/Controller/API/ApplyRewrites.pm b/lib/NGCP/Panel/Controller/API/ApplyRewrites.pm index f853e7a14c..201e46f160 100644 --- a/lib/NGCP/Panel/Controller/API/ApplyRewrites.pm +++ b/lib/NGCP/Panel/Controller/API/ApplyRewrites.pm @@ -39,18 +39,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-applyrewrites'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/AutoAttendants.pm b/lib/NGCP/Panel/Controller/API/AutoAttendants.pm index 140b14acd8..b1efdedf98 100644 --- a/lib/NGCP/Panel/Controller/API/AutoAttendants.pm +++ b/lib/NGCP/Panel/Controller/API/AutoAttendants.pm @@ -42,18 +42,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-autoattendants'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/BalanceIntervals.pm b/lib/NGCP/Panel/Controller/API/BalanceIntervals.pm index e4336e30d3..2b440f6c0e 100644 --- a/lib/NGCP/Panel/Controller/API/BalanceIntervals.pm +++ b/lib/NGCP/Panel/Controller/API/BalanceIntervals.pm @@ -86,18 +86,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-balanceintervals'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/BalanceIntervalsItem.pm b/lib/NGCP/Panel/Controller/API/BalanceIntervalsItem.pm index 8d59364564..fa57d62986 100644 --- a/lib/NGCP/Panel/Controller/API/BalanceIntervalsItem.pm +++ b/lib/NGCP/Panel/Controller/API/BalanceIntervalsItem.pm @@ -52,16 +52,9 @@ sub query_params { ]; } -__PACKAGE__->config( - action => { - (map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }), +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], + AllMethods => { item_base => { Chained => '/', PathPart => 'api/' . __PACKAGE__->resource_name, @@ -94,6 +87,19 @@ __PACKAGE__->config( AllowedRole => [qw/admin reseller/], Does => [qw(ACL RequireSSL)] }, + } +}); + +__PACKAGE__->config( + action => { + (map { $_ => { + ACLDetachTo => '/api/root/invalid_user', + AllowedRole => [qw/admin reseller/], + Args => 1, + Does => [qw(ACL RequireSSL)], + Method => $_, + Path => __PACKAGE__->dispatch_path, + } } @{ __PACKAGE__->allowed_methods }), }, ); diff --git a/lib/NGCP/Panel/Controller/API/BillingFees.pm b/lib/NGCP/Panel/Controller/API/BillingFees.pm index d90e1a0088..054689581d 100644 --- a/lib/NGCP/Panel/Controller/API/BillingFees.pm +++ b/lib/NGCP/Panel/Controller/API/BillingFees.pm @@ -51,18 +51,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-billingfees'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); sub auto :Private { diff --git a/lib/NGCP/Panel/Controller/API/BillingFeesItem.pm b/lib/NGCP/Panel/Controller/API/BillingFeesItem.pm index d68361d279..5a2b7dbdd8 100644 --- a/lib/NGCP/Panel/Controller/API/BillingFeesItem.pm +++ b/lib/NGCP/Panel/Controller/API/BillingFeesItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-billingfees'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/BillingNetworks.pm b/lib/NGCP/Panel/Controller/API/BillingNetworks.pm index a107189519..5b3c988746 100644 --- a/lib/NGCP/Panel/Controller/API/BillingNetworks.pm +++ b/lib/NGCP/Panel/Controller/API/BillingNetworks.pm @@ -76,18 +76,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-billingnetworks'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/BillingProfiles.pm b/lib/NGCP/Panel/Controller/API/BillingProfiles.pm index 11c8c3adb2..5ca82d3be0 100644 --- a/lib/NGCP/Panel/Controller/API/BillingProfiles.pm +++ b/lib/NGCP/Panel/Controller/API/BillingProfiles.pm @@ -63,18 +63,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-billingprofiles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/BillingZones.pm b/lib/NGCP/Panel/Controller/API/BillingZones.pm index 67b56a6ce8..41122958ff 100644 --- a/lib/NGCP/Panel/Controller/API/BillingZones.pm +++ b/lib/NGCP/Panel/Controller/API/BillingZones.pm @@ -61,18 +61,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-billingzones'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CCMapEntries.pm b/lib/NGCP/Panel/Controller/API/CCMapEntries.pm index 3c1604950d..da2a86f21e 100644 --- a/lib/NGCP/Panel/Controller/API/CCMapEntries.pm +++ b/lib/NGCP/Panel/Controller/API/CCMapEntries.pm @@ -40,18 +40,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-ccmapentries'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CFDestinationSets.pm b/lib/NGCP/Panel/Controller/API/CFDestinationSets.pm index 2bcbf9b75e..27e48bb414 100644 --- a/lib/NGCP/Panel/Controller/API/CFDestinationSets.pm +++ b/lib/NGCP/Panel/Controller/API/CFDestinationSets.pm @@ -65,18 +65,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-cfdestinationsets'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CFMappings.pm b/lib/NGCP/Panel/Controller/API/CFMappings.pm index 843d7ff27d..ea23dd959b 100644 --- a/lib/NGCP/Panel/Controller/API/CFMappings.pm +++ b/lib/NGCP/Panel/Controller/API/CFMappings.pm @@ -56,18 +56,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-cfmappings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CFSourceSets.pm b/lib/NGCP/Panel/Controller/API/CFSourceSets.pm index 2b044f46a8..699b32ea0b 100644 --- a/lib/NGCP/Panel/Controller/API/CFSourceSets.pm +++ b/lib/NGCP/Panel/Controller/API/CFSourceSets.pm @@ -72,18 +72,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-cfsourcesets'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CFTimeSets.pm b/lib/NGCP/Panel/Controller/API/CFTimeSets.pm index 8c793b7561..b683a52354 100644 --- a/lib/NGCP/Panel/Controller/API/CFTimeSets.pm +++ b/lib/NGCP/Panel/Controller/API/CFTimeSets.pm @@ -65,18 +65,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-cftimesets'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CallControls.pm b/lib/NGCP/Panel/Controller/API/CallControls.pm index 78df640011..1194d149db 100644 --- a/lib/NGCP/Panel/Controller/API/CallControls.pm +++ b/lib/NGCP/Panel/Controller/API/CallControls.pm @@ -42,18 +42,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-callcontrols'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CallForwards.pm b/lib/NGCP/Panel/Controller/API/CallForwards.pm index a9fd7b2466..d471c04438 100644 --- a/lib/NGCP/Panel/Controller/API/CallForwards.pm +++ b/lib/NGCP/Panel/Controller/API/CallForwards.pm @@ -58,18 +58,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-callforwards'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CallLists.pm b/lib/NGCP/Panel/Controller/API/CallLists.pm index c23a2945d7..221db9c49a 100644 --- a/lib/NGCP/Panel/Controller/API/CallLists.pm +++ b/lib/NGCP/Panel/Controller/API/CallLists.pm @@ -276,18 +276,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-calllists'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CallListsItem.pm b/lib/NGCP/Panel/Controller/API/CallListsItem.pm index cf147757b8..c34ee25daf 100644 --- a/lib/NGCP/Panel/Controller/API/CallListsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CallListsItem.pm @@ -29,18 +29,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-calllists'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CallRecordingFiles.pm b/lib/NGCP/Panel/Controller/API/CallRecordingFiles.pm index 088568d552..20f96403e6 100644 --- a/lib/NGCP/Panel/Controller/API/CallRecordingFiles.pm +++ b/lib/NGCP/Panel/Controller/API/CallRecordingFiles.pm @@ -34,18 +34,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-callrecordingfiles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); 1; diff --git a/lib/NGCP/Panel/Controller/API/CallRecordingFilesItem.pm b/lib/NGCP/Panel/Controller/API/CallRecordingFilesItem.pm index 0b37c587d1..ef5f90fa54 100644 --- a/lib/NGCP/Panel/Controller/API/CallRecordingFilesItem.pm +++ b/lib/NGCP/Panel/Controller/API/CallRecordingFilesItem.pm @@ -29,18 +29,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-callrecordingfiles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/CallRecordingStreams.pm b/lib/NGCP/Panel/Controller/API/CallRecordingStreams.pm index 412592b2ef..9ce454b4ef 100644 --- a/lib/NGCP/Panel/Controller/API/CallRecordingStreams.pm +++ b/lib/NGCP/Panel/Controller/API/CallRecordingStreams.pm @@ -67,18 +67,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-callrecordingstreams'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/CallRecordingStreamsItem.pm b/lib/NGCP/Panel/Controller/API/CallRecordingStreamsItem.pm index 1296370639..6be5ca1bce 100644 --- a/lib/NGCP/Panel/Controller/API/CallRecordingStreamsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CallRecordingStreamsItem.pm @@ -30,18 +30,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-callrecordingstreams'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/CallRecordings.pm b/lib/NGCP/Panel/Controller/API/CallRecordings.pm index 00e49bd275..94bcdd1e51 100644 --- a/lib/NGCP/Panel/Controller/API/CallRecordings.pm +++ b/lib/NGCP/Panel/Controller/API/CallRecordings.pm @@ -74,18 +74,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-callrecordings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/CallRecordingsItem.pm b/lib/NGCP/Panel/Controller/API/CallRecordingsItem.pm index 66a1dbc8fe..a61afef109 100644 --- a/lib/NGCP/Panel/Controller/API/CallRecordingsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CallRecordingsItem.pm @@ -28,18 +28,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-callrecordings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/Calls.pm b/lib/NGCP/Panel/Controller/API/Calls.pm index d69c6ac51d..afe0b17bae 100644 --- a/lib/NGCP/Panel/Controller/API/Calls.pm +++ b/lib/NGCP/Panel/Controller/API/Calls.pm @@ -75,18 +75,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-calls'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CallsItem.pm b/lib/NGCP/Panel/Controller/API/CallsItem.pm index 3063eccd16..9157623451 100644 --- a/lib/NGCP/Panel/Controller/API/CallsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CallsItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-calls'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Capabilities.pm b/lib/NGCP/Panel/Controller/API/Capabilities.pm index 753d25125e..948673733e 100644 --- a/lib/NGCP/Panel/Controller/API/Capabilities.pm +++ b/lib/NGCP/Panel/Controller/API/Capabilities.pm @@ -46,18 +46,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-capabilities'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/CapabilitiesItem.pm b/lib/NGCP/Panel/Controller/API/CapabilitiesItem.pm index 82c69e26c0..7af8f9e309 100644 --- a/lib/NGCP/Panel/Controller/API/CapabilitiesItem.pm +++ b/lib/NGCP/Panel/Controller/API/CapabilitiesItem.pm @@ -29,18 +29,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-capabilities'; } -__PACKAGE__->config( - action => { - (map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }), - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/Contracts.pm b/lib/NGCP/Panel/Controller/API/Contracts.pm index dd454b166f..e01c1be1d5 100644 --- a/lib/NGCP/Panel/Controller/API/Contracts.pm +++ b/lib/NGCP/Panel/Controller/API/Contracts.pm @@ -75,18 +75,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-contracts'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => 'admin', - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/CustomerBalances.pm b/lib/NGCP/Panel/Controller/API/CustomerBalances.pm index 1a1bac3882..6e5355b851 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerBalances.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerBalances.pm @@ -118,18 +118,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-customerbalances'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/CustomerContacts.pm b/lib/NGCP/Panel/Controller/API/CustomerContacts.pm index bdf11fe7d0..a48832c7df 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerContacts.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerContacts.pm @@ -62,18 +62,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-customercontacts'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CustomerFraudEvents.pm b/lib/NGCP/Panel/Controller/API/CustomerFraudEvents.pm index a66943655c..bb5d153d98 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerFraudEvents.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerFraudEvents.pm @@ -54,18 +54,9 @@ sub relation{ } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CustomerFraudEventsItem.pm b/lib/NGCP/Panel/Controller/API/CustomerFraudEventsItem.pm index fa99170af1..de4208e701 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerFraudEventsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerFraudEventsItem.pm @@ -35,18 +35,9 @@ sub query_params { } -__PACKAGE__->config( - action => { - (map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }), - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CustomerFraudPreferences.pm b/lib/NGCP/Panel/Controller/API/CustomerFraudPreferences.pm index e0096543e5..ecc27182a3 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerFraudPreferences.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerFraudPreferences.pm @@ -77,18 +77,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-customerfraudpreferences'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/CustomerLocations.pm b/lib/NGCP/Panel/Controller/API/CustomerLocations.pm index 81ef7330d1..8082f5f35a 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerLocations.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerLocations.pm @@ -64,18 +64,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-customerlocations'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CustomerPreferences.pm b/lib/NGCP/Panel/Controller/API/CustomerPreferences.pm index 60e4b2cde8..d9519c409a 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerPreferences.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerPreferences.pm @@ -52,18 +52,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-customerpreferences'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CustomerZoneCosts.pm b/lib/NGCP/Panel/Controller/API/CustomerZoneCosts.pm index 803360ab14..4d39566ef1 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerZoneCosts.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerZoneCosts.pm @@ -61,18 +61,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-customerzonecosts'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm b/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm index fb3a02454a..92cc12969f 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm @@ -30,18 +30,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-customerzonecosts'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Customers.pm b/lib/NGCP/Panel/Controller/API/Customers.pm index 3881d5d6d8..1b239047af 100644 --- a/lib/NGCP/Panel/Controller/API/Customers.pm +++ b/lib/NGCP/Panel/Controller/API/Customers.pm @@ -147,18 +147,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-customers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/DomainPreferences.pm b/lib/NGCP/Panel/Controller/API/DomainPreferences.pm index 802cb485a2..675b043fd8 100644 --- a/lib/NGCP/Panel/Controller/API/DomainPreferences.pm +++ b/lib/NGCP/Panel/Controller/API/DomainPreferences.pm @@ -43,18 +43,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-domainpreferences'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/DomainPreferencesItem.pm b/lib/NGCP/Panel/Controller/API/DomainPreferencesItem.pm index 67ce5a9bc3..403ea8905a 100644 --- a/lib/NGCP/Panel/Controller/API/DomainPreferencesItem.pm +++ b/lib/NGCP/Panel/Controller/API/DomainPreferencesItem.pm @@ -30,18 +30,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-domainpreferences'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Domains.pm b/lib/NGCP/Panel/Controller/API/Domains.pm index ee52fea3ca..effb7976a2 100644 --- a/lib/NGCP/Panel/Controller/API/Domains.pm +++ b/lib/NGCP/Panel/Controller/API/Domains.pm @@ -64,18 +64,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-domains'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/EmailTemplates.pm b/lib/NGCP/Panel/Controller/API/EmailTemplates.pm index 245457d233..e219168bd9 100644 --- a/lib/NGCP/Panel/Controller/API/EmailTemplates.pm +++ b/lib/NGCP/Panel/Controller/API/EmailTemplates.pm @@ -61,18 +61,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-emailtemplates'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/EmailTemplatesItem.pm b/lib/NGCP/Panel/Controller/API/EmailTemplatesItem.pm index c5d2946c47..737b4e47b9 100644 --- a/lib/NGCP/Panel/Controller/API/EmailTemplatesItem.pm +++ b/lib/NGCP/Panel/Controller/API/EmailTemplatesItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-emailtemplates'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/EmergencyMappingContainers.pm b/lib/NGCP/Panel/Controller/API/EmergencyMappingContainers.pm index 0b1fcf7383..def4ed824c 100644 --- a/lib/NGCP/Panel/Controller/API/EmergencyMappingContainers.pm +++ b/lib/NGCP/Panel/Controller/API/EmergencyMappingContainers.pm @@ -62,18 +62,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-emergencymappingcontainers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/EmergencyMappingContainersItem.pm b/lib/NGCP/Panel/Controller/API/EmergencyMappingContainersItem.pm index a639957c34..017432eebb 100644 --- a/lib/NGCP/Panel/Controller/API/EmergencyMappingContainersItem.pm +++ b/lib/NGCP/Panel/Controller/API/EmergencyMappingContainersItem.pm @@ -28,18 +28,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-emergencymappingcontainers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/EmergencyMappings.pm b/lib/NGCP/Panel/Controller/API/EmergencyMappings.pm index 25536d1180..d672f916dc 100644 --- a/lib/NGCP/Panel/Controller/API/EmergencyMappings.pm +++ b/lib/NGCP/Panel/Controller/API/EmergencyMappings.pm @@ -80,18 +80,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-emergencymappings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/EmergencyMappingsItem.pm b/lib/NGCP/Panel/Controller/API/EmergencyMappingsItem.pm index a599c60507..d43b968ea1 100644 --- a/lib/NGCP/Panel/Controller/API/EmergencyMappingsItem.pm +++ b/lib/NGCP/Panel/Controller/API/EmergencyMappingsItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-emergencymappings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Events.pm b/lib/NGCP/Panel/Controller/API/Events.pm index 8f15ae4cb9..50d1652653 100644 --- a/lib/NGCP/Panel/Controller/API/Events.pm +++ b/lib/NGCP/Panel/Controller/API/Events.pm @@ -97,18 +97,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-events'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/EventsItem.pm b/lib/NGCP/Panel/Controller/API/EventsItem.pm index 85a37a2fb4..474ad25cae 100644 --- a/lib/NGCP/Panel/Controller/API/EventsItem.pm +++ b/lib/NGCP/Panel/Controller/API/EventsItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-events'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/FaxRecordings.pm b/lib/NGCP/Panel/Controller/API/FaxRecordings.pm index 5758278d6f..7a3e87df55 100644 --- a/lib/NGCP/Panel/Controller/API/FaxRecordings.pm +++ b/lib/NGCP/Panel/Controller/API/FaxRecordings.pm @@ -34,18 +34,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-faxrecordings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/FaxRecordingsItem.pm b/lib/NGCP/Panel/Controller/API/FaxRecordingsItem.pm index 02d85b6375..6a15c7fc8a 100644 --- a/lib/NGCP/Panel/Controller/API/FaxRecordingsItem.pm +++ b/lib/NGCP/Panel/Controller/API/FaxRecordingsItem.pm @@ -30,18 +30,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-faxrecordings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Faxes.pm b/lib/NGCP/Panel/Controller/API/Faxes.pm index 07924ef487..35a7dac412 100644 --- a/lib/NGCP/Panel/Controller/API/Faxes.pm +++ b/lib/NGCP/Panel/Controller/API/Faxes.pm @@ -101,19 +101,12 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-faxes'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - ('POST' eq $_) ? (ContentType => ['multipart/form-data']) : (), - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], + GET => { + ContentType => ['multipart/form-data'], + } +}); diff --git a/lib/NGCP/Panel/Controller/API/FaxesItem.pm b/lib/NGCP/Panel/Controller/API/FaxesItem.pm index 7f1a0c82e7..24d3b8ff4a 100644 --- a/lib/NGCP/Panel/Controller/API/FaxesItem.pm +++ b/lib/NGCP/Panel/Controller/API/FaxesItem.pm @@ -28,18 +28,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-faxes'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/FaxserverSettings.pm b/lib/NGCP/Panel/Controller/API/FaxserverSettings.pm index 9089f947b4..5893b89bed 100644 --- a/lib/NGCP/Panel/Controller/API/FaxserverSettings.pm +++ b/lib/NGCP/Panel/Controller/API/FaxserverSettings.pm @@ -72,18 +72,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-faxserversettings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Interceptions.pm b/lib/NGCP/Panel/Controller/API/Interceptions.pm index a0b74485ae..34feccb3ad 100644 --- a/lib/NGCP/Panel/Controller/API/Interceptions.pm +++ b/lib/NGCP/Panel/Controller/API/Interceptions.pm @@ -62,18 +62,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-interceptions'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/InterceptionsItem.pm b/lib/NGCP/Panel/Controller/API/InterceptionsItem.pm index 934d3a01a3..25aeab56cd 100644 --- a/lib/NGCP/Panel/Controller/API/InterceptionsItem.pm +++ b/lib/NGCP/Panel/Controller/API/InterceptionsItem.pm @@ -28,18 +28,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-interceptions'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/InvoiceTemplates.pm b/lib/NGCP/Panel/Controller/API/InvoiceTemplates.pm index ff177a5e17..fd2ce1d93c 100644 --- a/lib/NGCP/Panel/Controller/API/InvoiceTemplates.pm +++ b/lib/NGCP/Panel/Controller/API/InvoiceTemplates.pm @@ -61,18 +61,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-invoicetemplates'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/InvoiceTemplatesItem.pm b/lib/NGCP/Panel/Controller/API/InvoiceTemplatesItem.pm index 9948d0aef9..a7665abe7b 100644 --- a/lib/NGCP/Panel/Controller/API/InvoiceTemplatesItem.pm +++ b/lib/NGCP/Panel/Controller/API/InvoiceTemplatesItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-invoicetemplates'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/LnpCarriers.pm b/lib/NGCP/Panel/Controller/API/LnpCarriers.pm index af03cfe8a7..8acc90a9aa 100644 --- a/lib/NGCP/Panel/Controller/API/LnpCarriers.pm +++ b/lib/NGCP/Panel/Controller/API/LnpCarriers.pm @@ -62,18 +62,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-lnpcarriers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/LnpCarriersItem.pm b/lib/NGCP/Panel/Controller/API/LnpCarriersItem.pm index 8e2888e043..1f7d827e14 100644 --- a/lib/NGCP/Panel/Controller/API/LnpCarriersItem.pm +++ b/lib/NGCP/Panel/Controller/API/LnpCarriersItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-lnpcarriers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/LnpNumbers.pm b/lib/NGCP/Panel/Controller/API/LnpNumbers.pm index 9cc5aa3c1a..49c2d33e28 100644 --- a/lib/NGCP/Panel/Controller/API/LnpNumbers.pm +++ b/lib/NGCP/Panel/Controller/API/LnpNumbers.pm @@ -71,18 +71,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-lnpnumbers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/LnpNumbersItem.pm b/lib/NGCP/Panel/Controller/API/LnpNumbersItem.pm index 65b6a98342..16eaebbf4d 100644 --- a/lib/NGCP/Panel/Controller/API/LnpNumbersItem.pm +++ b/lib/NGCP/Panel/Controller/API/LnpNumbersItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-lnpnumbers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/MailToFaxSettings.pm b/lib/NGCP/Panel/Controller/API/MailToFaxSettings.pm index 43ccb59431..28be5f4361 100644 --- a/lib/NGCP/Panel/Controller/API/MailToFaxSettings.pm +++ b/lib/NGCP/Panel/Controller/API/MailToFaxSettings.pm @@ -72,18 +72,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-mailtofaxsettings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/MaliciousCalls.pm b/lib/NGCP/Panel/Controller/API/MaliciousCalls.pm index 6ad6567bd2..6c93a0c9f1 100644 --- a/lib/NGCP/Panel/Controller/API/MaliciousCalls.pm +++ b/lib/NGCP/Panel/Controller/API/MaliciousCalls.pm @@ -119,18 +119,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-maliciouscalls'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/MaliciousCallsItem.pm b/lib/NGCP/Panel/Controller/API/MaliciousCallsItem.pm index edb4921bba..9ab1ea5a27 100644 --- a/lib/NGCP/Panel/Controller/API/MaliciousCallsItem.pm +++ b/lib/NGCP/Panel/Controller/API/MaliciousCallsItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-maliciouscalls'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/ManagerSecretary.pm b/lib/NGCP/Panel/Controller/API/ManagerSecretary.pm index c1c906d2c7..b41186c51e 100644 --- a/lib/NGCP/Panel/Controller/API/ManagerSecretary.pm +++ b/lib/NGCP/Panel/Controller/API/ManagerSecretary.pm @@ -45,18 +45,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-managersecretary'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/MetaConfigDefs.pm b/lib/NGCP/Panel/Controller/API/MetaConfigDefs.pm index 8b9a6cdce3..93811fd7fd 100644 --- a/lib/NGCP/Panel/Controller/API/MetaConfigDefs.pm +++ b/lib/NGCP/Panel/Controller/API/MetaConfigDefs.pm @@ -30,18 +30,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-metaconfigdefs'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/],#left adminand reseller, as test can run as reseller too. Just don't return full config - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/NcosLevels.pm b/lib/NGCP/Panel/Controller/API/NcosLevels.pm index 71ff14b670..4ebfcfc233 100644 --- a/lib/NGCP/Panel/Controller/API/NcosLevels.pm +++ b/lib/NGCP/Panel/Controller/API/NcosLevels.pm @@ -61,18 +61,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-ncoslevels'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/NcosLevelsItem.pm b/lib/NGCP/Panel/Controller/API/NcosLevelsItem.pm index 70646aea93..93721e8694 100644 --- a/lib/NGCP/Panel/Controller/API/NcosLevelsItem.pm +++ b/lib/NGCP/Panel/Controller/API/NcosLevelsItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-ncoslevels'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/NcosLnpCarriers.pm b/lib/NGCP/Panel/Controller/API/NcosLnpCarriers.pm index 7955b2ffc8..2c73702920 100644 --- a/lib/NGCP/Panel/Controller/API/NcosLnpCarriers.pm +++ b/lib/NGCP/Panel/Controller/API/NcosLnpCarriers.pm @@ -61,18 +61,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-ncoslnpcarriers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/NcosLnpCarriersItem.pm b/lib/NGCP/Panel/Controller/API/NcosLnpCarriersItem.pm index 479499ef74..45a83a6be2 100644 --- a/lib/NGCP/Panel/Controller/API/NcosLnpCarriersItem.pm +++ b/lib/NGCP/Panel/Controller/API/NcosLnpCarriersItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-ncoslnpcarriers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/NcosPatterns.pm b/lib/NGCP/Panel/Controller/API/NcosPatterns.pm index a2687cf613..4f8e3a1fdd 100644 --- a/lib/NGCP/Panel/Controller/API/NcosPatterns.pm +++ b/lib/NGCP/Panel/Controller/API/NcosPatterns.pm @@ -50,18 +50,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-ncospatterns'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/NcosPatternsItem.pm b/lib/NGCP/Panel/Controller/API/NcosPatternsItem.pm index fcc28cd3a9..6b38ebb09a 100644 --- a/lib/NGCP/Panel/Controller/API/NcosPatternsItem.pm +++ b/lib/NGCP/Panel/Controller/API/NcosPatternsItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-ncospatterns'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Numbers.pm b/lib/NGCP/Panel/Controller/API/Numbers.pm index 007376bc59..66a1e6eb4d 100644 --- a/lib/NGCP/Panel/Controller/API/Numbers.pm +++ b/lib/NGCP/Panel/Controller/API/Numbers.pm @@ -86,18 +86,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-numbers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); sub GET :Allow { diff --git a/lib/NGCP/Panel/Controller/API/PartyCallControls.pm b/lib/NGCP/Panel/Controller/API/PartyCallControls.pm index 3a3bc32419..1567c2fcb6 100644 --- a/lib/NGCP/Panel/Controller/API/PartyCallControls.pm +++ b/lib/NGCP/Panel/Controller/API/PartyCallControls.pm @@ -43,18 +43,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-partycallcontrols'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFiles.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFiles.pm index c29c73d63e..623efd065d 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFiles.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFiles.pm @@ -39,18 +39,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdeviceconfigfiles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFilesItem.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFilesItem.pm index 4e942653f4..603cebf3f9 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFilesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFilesItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdeviceconfigfiles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigs.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigs.pm index 871bf86eac..89f6bb98ca 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigs.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigs.pm @@ -72,18 +72,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdeviceconfigs'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigsItem.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigsItem.pm index fccbb55404..540417287d 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigsItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigsItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdeviceconfigs'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinaries.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinaries.pm index 7dfe81b98d..e99de56205 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinaries.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinaries.pm @@ -39,18 +39,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdevicefirmwarebinaries'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinariesItem.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinariesItem.pm index 3be081db5e..b4f665a155 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinariesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinariesItem.pm @@ -28,18 +28,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdevicefirmwarebinaries'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwares.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwares.pm index 774fd009d0..8f95aa0b97 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwares.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwares.pm @@ -73,18 +73,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdevicefirmwares'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwaresItem.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwaresItem.pm index e37d56a9f5..c66085a845 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwaresItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwaresItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdevicefirmwares'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDevicePreferences.pm b/lib/NGCP/Panel/Controller/API/PbxDevicePreferences.pm index ab13173ebe..d375495e0b 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDevicePreferences.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDevicePreferences.pm @@ -34,18 +34,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdevicepreferences'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferences.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferences.pm index 542f84497b..2b1a0aa435 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferences.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferences.pm @@ -34,18 +34,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdeviceprofilepreferences'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceProfiles.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceProfiles.pm index f22166bb7c..a679474dc6 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceProfiles.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceProfiles.pm @@ -62,18 +62,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdeviceprofiles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilesItem.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilesItem.pm index a0bfff5866..8a95147dd1 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilesItem.pm @@ -30,18 +30,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdeviceprofiles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDevices.pm b/lib/NGCP/Panel/Controller/API/PbxDevices.pm index adfa94c569..20ff12b8a6 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDevices.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDevices.pm @@ -74,18 +74,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdevices'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PbxDevicesItem.pm b/lib/NGCP/Panel/Controller/API/PbxDevicesItem.pm index c062e0d3da..63daa67f3b 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDevicesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDevicesItem.pm @@ -30,18 +30,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-pbxdevices'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PeeringGroups.pm b/lib/NGCP/Panel/Controller/API/PeeringGroups.pm index 7db4e07313..ff01a684c2 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringGroups.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringGroups.pm @@ -51,18 +51,9 @@ sub query_params { ]; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PeeringGroupsItem.pm b/lib/NGCP/Panel/Controller/API/PeeringGroupsItem.pm index 21203d31dd..636383d4d1 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringGroupsItem.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringGroupsItem.pm @@ -17,18 +17,9 @@ sub allowed_methods{ return [qw/GET OPTIONS HEAD PATCH PUT DELETE/]; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PeeringInboundRules.pm b/lib/NGCP/Panel/Controller/API/PeeringInboundRules.pm index d8591bdba7..ddd05b96a1 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringInboundRules.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringInboundRules.pm @@ -73,18 +73,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-peeringinboundrules'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PeeringInboundRulesItem.pm b/lib/NGCP/Panel/Controller/API/PeeringInboundRulesItem.pm index 568b0c3b9e..ce37048374 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringInboundRulesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringInboundRulesItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-peeringinboundrules'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PeeringRules.pm b/lib/NGCP/Panel/Controller/API/PeeringRules.pm index 04aaa3a05a..40e62264fb 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringRules.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringRules.pm @@ -73,18 +73,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-peeringrules'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PeeringRulesItem.pm b/lib/NGCP/Panel/Controller/API/PeeringRulesItem.pm index deb5365b7f..68d351a8f3 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringRulesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringRulesItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-peeringrules'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PeeringServerPreferences.pm b/lib/NGCP/Panel/Controller/API/PeeringServerPreferences.pm index 9302a15d2b..59099fa9a4 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringServerPreferences.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringServerPreferences.pm @@ -42,18 +42,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-peeringserverpreferences'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PeeringServers.pm b/lib/NGCP/Panel/Controller/API/PeeringServers.pm index c8aba8814f..e377b26097 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringServers.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringServers.pm @@ -94,18 +94,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-peeringservers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/PeeringServersItem.pm b/lib/NGCP/Panel/Controller/API/PeeringServersItem.pm index b9fdc323ca..04233cba40 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringServersItem.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringServersItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-peeringservers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/ProfilePackages.pm b/lib/NGCP/Panel/Controller/API/ProfilePackages.pm index 257e2e55f9..8c198cb88c 100644 --- a/lib/NGCP/Panel/Controller/API/ProfilePackages.pm +++ b/lib/NGCP/Panel/Controller/API/ProfilePackages.pm @@ -90,18 +90,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-profilepackages'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/ProfilePreferences.pm b/lib/NGCP/Panel/Controller/API/ProfilePreferences.pm index 5553661d15..dffa7447a1 100644 --- a/lib/NGCP/Panel/Controller/API/ProfilePreferences.pm +++ b/lib/NGCP/Panel/Controller/API/ProfilePreferences.pm @@ -34,18 +34,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-profilepreferences'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Reminders.pm b/lib/NGCP/Panel/Controller/API/Reminders.pm index 1f2a5a38cc..34fd79c957 100644 --- a/lib/NGCP/Panel/Controller/API/Reminders.pm +++ b/lib/NGCP/Panel/Controller/API/Reminders.pm @@ -67,18 +67,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-reminders'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Resellers.pm b/lib/NGCP/Panel/Controller/API/Resellers.pm index 814a178795..7faa93f597 100644 --- a/lib/NGCP/Panel/Controller/API/Resellers.pm +++ b/lib/NGCP/Panel/Controller/API/Resellers.pm @@ -53,18 +53,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-resellers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => 'admin', - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/RtcApps.pm b/lib/NGCP/Panel/Controller/API/RtcApps.pm index 32c05ce213..d910b2d4b5 100644 --- a/lib/NGCP/Panel/Controller/API/RtcApps.pm +++ b/lib/NGCP/Panel/Controller/API/RtcApps.pm @@ -38,18 +38,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-rtcapps'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/RtcNetworks.pm b/lib/NGCP/Panel/Controller/API/RtcNetworks.pm index adc62888fb..5e3a7f5754 100644 --- a/lib/NGCP/Panel/Controller/API/RtcNetworks.pm +++ b/lib/NGCP/Panel/Controller/API/RtcNetworks.pm @@ -38,18 +38,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-rtcnetworks'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/RtcSessions.pm b/lib/NGCP/Panel/Controller/API/RtcSessions.pm index 08afcf35bd..a7752668b0 100644 --- a/lib/NGCP/Panel/Controller/API/RtcSessions.pm +++ b/lib/NGCP/Panel/Controller/API/RtcSessions.pm @@ -40,18 +40,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-rtcsessions'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriber subscriberadmin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriber subscriberadmin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SoundFileRecordings.pm b/lib/NGCP/Panel/Controller/API/SoundFileRecordings.pm index 45f57bd39c..82f24c2365 100644 --- a/lib/NGCP/Panel/Controller/API/SoundFileRecordings.pm +++ b/lib/NGCP/Panel/Controller/API/SoundFileRecordings.pm @@ -39,18 +39,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-soundfilerecordings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SoundFileRecordingsItem.pm b/lib/NGCP/Panel/Controller/API/SoundFileRecordingsItem.pm index 1290d2562d..f1ef2beb7b 100644 --- a/lib/NGCP/Panel/Controller/API/SoundFileRecordingsItem.pm +++ b/lib/NGCP/Panel/Controller/API/SoundFileRecordingsItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-soundfilerecordings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SoundFiles.pm b/lib/NGCP/Panel/Controller/API/SoundFiles.pm index 7ce6930472..f3b2547437 100644 --- a/lib/NGCP/Panel/Controller/API/SoundFiles.pm +++ b/lib/NGCP/Panel/Controller/API/SoundFiles.pm @@ -51,18 +51,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-soundfiles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); sub auto :Private { diff --git a/lib/NGCP/Panel/Controller/API/SoundFilesItem.pm b/lib/NGCP/Panel/Controller/API/SoundFilesItem.pm index ba387be7c2..d97ff05c37 100644 --- a/lib/NGCP/Panel/Controller/API/SoundFilesItem.pm +++ b/lib/NGCP/Panel/Controller/API/SoundFilesItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-soundfiles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SoundHandles.pm b/lib/NGCP/Panel/Controller/API/SoundHandles.pm index 8cf94aaf59..cda7cad24b 100644 --- a/lib/NGCP/Panel/Controller/API/SoundHandles.pm +++ b/lib/NGCP/Panel/Controller/API/SoundHandles.pm @@ -52,18 +52,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-soundhandles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SoundHandlesItem.pm b/lib/NGCP/Panel/Controller/API/SoundHandlesItem.pm index b0d4d6c1f4..0c71745ba0 100644 --- a/lib/NGCP/Panel/Controller/API/SoundHandlesItem.pm +++ b/lib/NGCP/Panel/Controller/API/SoundHandlesItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-soundhandles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SoundSets.pm b/lib/NGCP/Panel/Controller/API/SoundSets.pm index 33d5201294..c96c5bb1fe 100644 --- a/lib/NGCP/Panel/Controller/API/SoundSets.pm +++ b/lib/NGCP/Panel/Controller/API/SoundSets.pm @@ -72,18 +72,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-soundsets'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SpeedDials.pm b/lib/NGCP/Panel/Controller/API/SpeedDials.pm index df0505d651..e8105c3252 100644 --- a/lib/NGCP/Panel/Controller/API/SpeedDials.pm +++ b/lib/NGCP/Panel/Controller/API/SpeedDials.pm @@ -56,18 +56,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-speeddials'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberPreferences.pm b/lib/NGCP/Panel/Controller/API/SubscriberPreferences.pm index eaeea09a11..b15ff25d51 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberPreferences.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberPreferences.pm @@ -76,18 +76,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-subscriberpreferences'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberProfileSets.pm b/lib/NGCP/Panel/Controller/API/SubscriberProfileSets.pm index cb446893f4..c93bd8cdbd 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberProfileSets.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberProfileSets.pm @@ -61,18 +61,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-subscriberprofilesets'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberProfiles.pm b/lib/NGCP/Panel/Controller/API/SubscriberProfiles.pm index 3e5d0b9f29..b9954de5b5 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberProfiles.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberProfiles.pm @@ -61,18 +61,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-subscriberprofiles'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberRegistrations.pm b/lib/NGCP/Panel/Controller/API/SubscriberRegistrations.pm index e3f9e1795e..7a8a600d89 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberRegistrations.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberRegistrations.pm @@ -70,18 +70,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-subscriberregistrations'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberRegistrationsItem.pm b/lib/NGCP/Panel/Controller/API/SubscriberRegistrationsItem.pm index a2425e0fcb..996ad999ba 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberRegistrationsItem.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberRegistrationsItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-subscriberregistrations'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Subscribers.pm b/lib/NGCP/Panel/Controller/API/Subscribers.pm index a9452ab32c..0fb3b51c25 100644 --- a/lib/NGCP/Panel/Controller/API/Subscribers.pm +++ b/lib/NGCP/Panel/Controller/API/Subscribers.pm @@ -273,18 +273,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-subscribers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/SystemContacts.pm b/lib/NGCP/Panel/Controller/API/SystemContacts.pm index 136e54a00f..7a49c16127 100644 --- a/lib/NGCP/Panel/Controller/API/SystemContacts.pm +++ b/lib/NGCP/Panel/Controller/API/SystemContacts.pm @@ -51,18 +51,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-systemcontacts'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => 'admin', - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin/], +}); diff --git a/lib/NGCP/Panel/Controller/API/TopupCash.pm b/lib/NGCP/Panel/Controller/API/TopupCash.pm index 6f964de1fd..b0fbb2e0b2 100644 --- a/lib/NGCP/Panel/Controller/API/TopupCash.pm +++ b/lib/NGCP/Panel/Controller/API/TopupCash.pm @@ -44,18 +44,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-topupcash'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/TopupLogs.pm b/lib/NGCP/Panel/Controller/API/TopupLogs.pm index 72c1a0a019..b0cc408803 100644 --- a/lib/NGCP/Panel/Controller/API/TopupLogs.pm +++ b/lib/NGCP/Panel/Controller/API/TopupLogs.pm @@ -156,18 +156,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-topuplogs'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/TopupLogsItem.pm b/lib/NGCP/Panel/Controller/API/TopupLogsItem.pm index eb5c2e561c..bc06508839 100644 --- a/lib/NGCP/Panel/Controller/API/TopupLogsItem.pm +++ b/lib/NGCP/Panel/Controller/API/TopupLogsItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-topuplogs'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/TopupVouchers.pm b/lib/NGCP/Panel/Controller/API/TopupVouchers.pm index 79934f581e..622d321ca2 100644 --- a/lib/NGCP/Panel/Controller/API/TopupVouchers.pm +++ b/lib/NGCP/Panel/Controller/API/TopupVouchers.pm @@ -44,18 +44,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-topupvouchers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/TrustedSources.pm b/lib/NGCP/Panel/Controller/API/TrustedSources.pm index 1a1b5ad594..02a4316250 100644 --- a/lib/NGCP/Panel/Controller/API/TrustedSources.pm +++ b/lib/NGCP/Panel/Controller/API/TrustedSources.pm @@ -55,18 +55,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-trustedsources'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/UpnRewriteSets.pm b/lib/NGCP/Panel/Controller/API/UpnRewriteSets.pm index 0c6eb10d4c..b736fad9ee 100644 --- a/lib/NGCP/Panel/Controller/API/UpnRewriteSets.pm +++ b/lib/NGCP/Panel/Controller/API/UpnRewriteSets.pm @@ -54,18 +54,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-upnrewritesets'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/VoicemailRecordings.pm b/lib/NGCP/Panel/Controller/API/VoicemailRecordings.pm index ecfb862339..ddf6adbabe 100644 --- a/lib/NGCP/Panel/Controller/API/VoicemailRecordings.pm +++ b/lib/NGCP/Panel/Controller/API/VoicemailRecordings.pm @@ -34,18 +34,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-voicemailrecordings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods }, - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); sub query_params { return [ diff --git a/lib/NGCP/Panel/Controller/API/VoicemailRecordingsItem.pm b/lib/NGCP/Panel/Controller/API/VoicemailRecordingsItem.pm index 88af818aa1..a2dc452105 100644 --- a/lib/NGCP/Panel/Controller/API/VoicemailRecordingsItem.pm +++ b/lib/NGCP/Panel/Controller/API/VoicemailRecordingsItem.pm @@ -29,18 +29,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-voicemailrecordings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/VoicemailSettings.pm b/lib/NGCP/Panel/Controller/API/VoicemailSettings.pm index 0a5d1b8673..c7e04d8fea 100644 --- a/lib/NGCP/Panel/Controller/API/VoicemailSettings.pm +++ b/lib/NGCP/Panel/Controller/API/VoicemailSettings.pm @@ -54,18 +54,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-voicemailsettings'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Voicemails.pm b/lib/NGCP/Panel/Controller/API/Voicemails.pm index 95ffce1177..33f8e2985b 100644 --- a/lib/NGCP/Panel/Controller/API/Voicemails.pm +++ b/lib/NGCP/Panel/Controller/API/Voicemails.pm @@ -63,18 +63,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-voicemails'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/VoicemailsItem.pm b/lib/NGCP/Panel/Controller/API/VoicemailsItem.pm index 3a25cada9b..1e6b19f942 100644 --- a/lib/NGCP/Panel/Controller/API/VoicemailsItem.pm +++ b/lib/NGCP/Panel/Controller/API/VoicemailsItem.pm @@ -28,18 +28,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-voicemails'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller subscriberadmin subscriber/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller subscriberadmin subscriber/], +}); diff --git a/lib/NGCP/Panel/Controller/API/Vouchers.pm b/lib/NGCP/Panel/Controller/API/Vouchers.pm index 7b49acf737..de11c7fc4f 100644 --- a/lib/NGCP/Panel/Controller/API/Vouchers.pm +++ b/lib/NGCP/Panel/Controller/API/Vouchers.pm @@ -61,18 +61,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-vouchers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 0, - Does => [qw(ACL CheckTrailingSlash RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); diff --git a/lib/NGCP/Panel/Controller/API/VouchersItem.pm b/lib/NGCP/Panel/Controller/API/VouchersItem.pm index a0d749c9f5..756192bf9a 100644 --- a/lib/NGCP/Panel/Controller/API/VouchersItem.pm +++ b/lib/NGCP/Panel/Controller/API/VouchersItem.pm @@ -27,18 +27,9 @@ sub relation{ return 'http://purl.org/sipwise/ngcp-api/#rel-vouchers'; } -__PACKAGE__->config( - action => { - map { $_ => { - ACLDetachTo => '/api/root/invalid_user', - AllowedRole => [qw/admin reseller/], - Args => 1, - Does => [qw(ACL RequireSSL)], - Method => $_, - Path => __PACKAGE__->dispatch_path, - } } @{ __PACKAGE__->allowed_methods } - }, -); +__PACKAGE__->set_config({ + allowed_roles => [qw/admin reseller/], +}); sub GET :Allow { my ($self, $c, $id) = @_;