MT#22657 Close peering API for the reseller role and small texts fixes

Change-Id: I172a34b51d7b856b5e1b7b6b4cdfac73898adee0
(cherry picked from commit 95c550e848)
changes/84/8384/2
Irina Peshinskaya 9 years ago
parent 545d639efb
commit 798d0f9d12

@ -58,7 +58,7 @@ __PACKAGE__->config(
action => {
map { $_ => {
ACLDetachTo => '/api/root/invalid_user',
AllowedRole => [qw/admin reseller/],
AllowedRole => [qw/admin/],
Args => 0,
Does => [qw(ACL CheckTrailingSlash RequireSSL)],
Method => $_,

@ -22,7 +22,7 @@ __PACKAGE__->config(
action => {
map { $_ => {
ACLDetachTo => '/api/root/invalid_user',
AllowedRole => [qw/admin reseller/],
AllowedRole => [qw/admin/],
Args => 1,
Does => [qw(ACL RequireSSL)],
Method => $_,

@ -22,14 +22,14 @@ sub allowed_methods{
}
sub api_description {
return 'Defines peering groups.';
return 'Defines outbound peering rules.';
};
sub query_params {
return [
{
param => 'group_id',
description => 'Filter for peering rule group',
description => 'Filter for peering group',
query => {
first => sub {
my $q = shift;
@ -79,7 +79,7 @@ __PACKAGE__->config(
action => {
map { $_ => {
ACLDetachTo => '/api/root/invalid_user',
AllowedRole => [qw/admin reseller/],
AllowedRole => [qw/admin/],
Args => 0,
Does => [qw(ACL CheckTrailingSlash RequireSSL)],
Method => $_,

@ -33,7 +33,7 @@ __PACKAGE__->config(
action => {
map { $_ => {
ACLDetachTo => '/api/root/invalid_user',
AllowedRole => [qw/admin reseller/],
AllowedRole => [qw/admin/],
Args => 1,
Does => [qw(ACL RequireSSL)],
Method => $_,

@ -38,7 +38,7 @@ __PACKAGE__->config(
action => {
map { $_ => {
ACLDetachTo => '/api/root/invalid_user',
AllowedRole => [qw/admin reseller/],
AllowedRole => [qw/admin/],
Args => 0,
Does => [qw(ACL CheckTrailingSlash RequireSSL)],
Method => $_,

@ -40,7 +40,7 @@ __PACKAGE__->config(
action => {
map { $_ => {
ACLDetachTo => '/api/root/invalid_user',
AllowedRole => [qw/admin reseller/],
AllowedRole => [qw/admin/],
Args => 0,
Does => [qw(ACL CheckTrailingSlash RequireSSL)],
Method => $_,

@ -41,7 +41,7 @@ __PACKAGE__->config(
action => {
(map { $_ => {
ACLDetachTo => '/api/root/invalid_user',
AllowedRole => [qw/admin reseller/],
AllowedRole => [qw/admin/],
Args => 1,
Does => [qw(ACL RequireSSL)],
Method => $_,
@ -49,7 +49,7 @@ __PACKAGE__->config(
} } @{ __PACKAGE__->allowed_methods }),
@{ __PACKAGE__->get_journal_action_config(__PACKAGE__->resource_name,{
ACLDetachTo => '/api/root/invalid_user',
AllowedRole => [qw/admin reseller/],
AllowedRole => [qw/admin/],
Does => [qw(ACL RequireSSL)],
}) }
},

@ -22,7 +22,7 @@ sub allowed_methods{
}
sub api_description {
return 'Defines peering groups.';
return 'Defines peering servers.';
};
sub query_params {
@ -100,7 +100,7 @@ __PACKAGE__->config(
action => {
map { $_ => {
ACLDetachTo => '/api/root/invalid_user',
AllowedRole => [qw/admin reseller/],
AllowedRole => [qw/admin/],
Args => 0,
Does => [qw(ACL CheckTrailingSlash RequireSSL)],
Method => $_,

@ -33,7 +33,7 @@ __PACKAGE__->config(
action => {
map { $_ => {
ACLDetachTo => '/api/root/invalid_user',
AllowedRole => [qw/admin reseller/],
AllowedRole => [qw/admin/],
Args => 1,
Does => [qw(ACL RequireSSL)],
Method => $_,

@ -24,7 +24,7 @@ sub _item_rs {
sub get_form {
my ($self, $c) = @_;
return NGCP::Panel::Form::Peering::Group->new;
return NGCP::Panel::Form::Peering::Group->new(ctx => $c);
}
sub hal_from_item {
@ -42,6 +42,8 @@ sub hal_from_item {
Data::HAL::Link->new(relation => 'collection', href => sprintf("/api/%s/", $self->resource_name)),
Data::HAL::Link->new(relation => 'profile', href => 'http://purl.org/sipwise/ngcp-api/'),
Data::HAL::Link->new(relation => 'self', href => sprintf("%s%d", $self->dispatch_path, $item->id)),
Data::HAL::Link->new(relation => 'ngcp:peeringservers', href => sprintf("/api/peeringservers/?group_id=%d", $item->id)),
Data::HAL::Link->new(relation => 'ngcp:peeringrules', href => sprintf("/api/peeringrules/?group_id=%d", $item->id)),
],
relation => 'ngcp:'.$self->resource_name,
);

@ -20,7 +20,7 @@ sub _item_rs {
sub get_form {
my ($self, $c) = @_;
return NGCP::Panel::Form::Peering::RuleAPI->new;
return NGCP::Panel::Form::Peering::RuleAPI->new(ctx => $c);
}
sub hal_from_item {

@ -20,7 +20,7 @@ sub _item_rs {
sub get_form {
my ($self, $c) = @_;
return NGCP::Panel::Form::Peering::ServerAPI->new;
return NGCP::Panel::Form::Peering::ServerAPI->new(ctx => $c);
}
sub hal_from_item {

Loading…
Cancel
Save