diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2020-03-07 11:19:34 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2020-03-07 11:20:45 -0800 |
commit | 1383dfc4ff1dfe5bfa5b327b4ae19b2af6a2a28e (patch) | |
tree | ef46b4d84362cabf31dd2c098d0fae38fcd0e018 /Bugzilla/WebService/Component.pm | |
parent | Gentoo: alpha is now ~arch-only (diff) | |
parent | Bugzilla/Util: disable BiDi tr safety (diff) | |
download | bugzilla-1383dfc4ff1dfe5bfa5b327b4ae19b2af6a2a28e.tar.gz bugzilla-1383dfc4ff1dfe5bfa5b327b4ae19b2af6a2a28e.tar.bz2 bugzilla-1383dfc4ff1dfe5bfa5b327b4ae19b2af6a2a28e.zip |
Bugzilla 5.0.6! Merge branch 'bugstest'
This update Gentoo production Bugzilla to 5.0.6.
Please note that upstream reformatted all code, so the commit series has
some extra hops to help reflect that change.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'Bugzilla/WebService/Component.pm')
-rw-r--r-- | Bugzilla/WebService/Component.pm | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/Bugzilla/WebService/Component.pm b/Bugzilla/WebService/Component.pm index 4d6723d8b..802f40c73 100644 --- a/Bugzilla/WebService/Component.pm +++ b/Bugzilla/WebService/Component.pm @@ -19,37 +19,36 @@ use Bugzilla::Error; use Bugzilla::WebService::Constants; use Bugzilla::WebService::Util qw(translate params_to_objects validate); -use constant PUBLIC_METHODS => qw( - create +use constant PUBLIC_METHODS => qw( + create ); use constant MAPPED_FIELDS => { - default_assignee => 'initialowner', - default_qa_contact => 'initialqacontact', - default_cc => 'initial_cc', - is_open => 'isactive', + default_assignee => 'initialowner', + default_qa_contact => 'initialqacontact', + default_cc => 'initial_cc', + is_open => 'isactive', }; sub create { - my ($self, $params) = @_; + my ($self, $params) = @_; - my $user = Bugzilla->login(LOGIN_REQUIRED); + my $user = Bugzilla->login(LOGIN_REQUIRED); - $user->in_group('editcomponents') - || scalar @{ $user->get_products_by_permission('editcomponents') } - || ThrowUserError('auth_failure', { group => 'editcomponents', - action => 'edit', - object => 'components' }); + $user->in_group('editcomponents') + || scalar @{$user->get_products_by_permission('editcomponents')} + || ThrowUserError('auth_failure', + {group => 'editcomponents', action => 'edit', object => 'components'}); - my $product = $user->check_can_admin_product($params->{product}); + my $product = $user->check_can_admin_product($params->{product}); - # Translate the fields - my $values = translate($params, MAPPED_FIELDS); - $values->{product} = $product; + # Translate the fields + my $values = translate($params, MAPPED_FIELDS); + $values->{product} = $product; - # Create the component and return the newly created id. - my $component = Bugzilla::Component->create($values); - return { id => $self->type('int', $component->id) }; + # Create the component and return the newly created id. + my $component = Bugzilla::Component->create($values); + return {id => $self->type('int', $component->id)}; } 1; |