TT#4335 callforwards and speeddials subscriber api

Change-Id: Ie48e86e74121f8c96bed97390a3803f51a247df5
changes/25/12625/2
Gerhard Jungwirth 9 years ago
parent afa5a6072f
commit 8f98cd1d73

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

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

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

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

@ -105,6 +105,10 @@ sub _item_rs {
}, {
join => 'contract',
});
} elsif ($c->user->roles eq 'subscriber') {
$item_rs = $item_rs->search({
'me.uuid' => $c->user->uuid,
});
}
return $item_rs;

@ -79,6 +79,10 @@ sub _item_rs {
join => 'contract',
});
# TODO should be filtered for subscribers whose profile allows speed_dial?
} elsif ($c->user->roles eq "subscriber") {
$item_rs = $item_rs->search({
'me.uuid' => $c->user->uuid,
});
}
return $item_rs;

Loading…
Cancel
Save