* templates now rely on c.config.general.ngcp_type and hide
the Phonebook feature everywhere if ngcp_type is CE
* introduce "allowed_ngcp_types" config for Controller::API::*
that is an array, and when specified, only the ngcp_type
roles are allowed, otherwise if not specified all ngcp types
allowed (default)
* Controller::API::Root:
- filter controllers from the documentation rendedring
that have allowed_ngcp_type config
specified and do not match the current ngcp type
* Role::API Role::Entities*
- new method check_allowed_ngcp_types()
- check_allowed_ngcp_types() is now called in Entities and
EntitiesItem auto() and denies to 404 Path not found if
the ngcp type does not match
* "Phonebook" UI is now hidden for CE
* /api/phonebookentries is now hidden for CE
Change-Id: I41d4b2f87121f281472be3775b862333923fe37f
the /api/provisionintemplates rail provides the
operations to create, edit and delete "provisioning
templates" know from the "batch provisioning" feature
of admin panel.
these templates can also be defined in config.yml,
while it is however only possible to edit templates
stored in the database.
executing a template and/or uploading a .csv for bulk
execution will be available in a separate part.
Change-Id: If8627327270edfce5bca1be3b1f777c1bd44e90f
* Consider POST body not utf8 encoded, so encode "json" parameter
* Allow empty body for multipart/form-data controlled by configuration
as faxes took text from "json" part too.
* Allow empty return from create, meaning asynchronous operations,
like fax creation
* Allow to skip hal validation through form.
Can be used for collections without PUT and PATCH.
Change-Id: If0d0e7cdc6abe53d76ad0b18568e93743040e90f
* colelction_nav_links() should be used instead of the old
self/prev/next href link code
* Entities.pm fix colletion_nav_links() to pass missing
$c->request->params
* collection_nav_links() use default $c->request->path and
$c->request->params if those arguments are not specified
Change-Id: Icca5afac812f2e06e6927ba6f4e91057f9745d21
* /api/phonebookentries is used for the
phonebook_reseller
phonebook_contract
phonebook_subscriber data storage interaction
Change-Id: If45390fd3080886e03602216cfbacc33296f1558
with the previous commit, there is no need anymore to specify form
exceptions manually. validate_form will now automatically consider fields
in the correct format with and without "_id"
Change-Id: I70afae4003c6407c7a37396630110736f1fb13f8
Remove excrescent code from the pbxdevicemodels API & Panel
Add roles control per method for the API
Use form field "required" attribute for the API uploads
Fix getting old resource for the PATCH and PUT methods
Change-Id: Ia0515b3d071d45435db7c9138ea9de9447775143
* billing is split into 2 parts:
- init_prepaid_billing (reserves billing/creates session)
- perform_prepaid_billing (commits or cancels the session)
* when sms fails to be sent the billing session is canceled
(was committed before, regardless)
* NGCP::Panel::Entities::post
- do not do $self->return_representation_post() if
api_error_message is present, therefore, the actual
error is returned
* sms_journal item is now created also in case of an error
* improved errors indication
Change-Id: I454b8c6a1c04d743ee82e03f8621c7cc4c7c4f98
the factory Catalyst::ActionRole::HTTPMethods action role
is set for any action, and in race with our own
NGCP::Panel::Role::HTTPMethods. the testcase could have
been misleading ever since, as it uses DELETE /api/customers,
which was present when implemting the method override initially,
but dropped on the road to 4.5.
the issue is resolved by overriding
Catalyst::Controller::gather_default_action_roles.
until the class hierachy refactoring is completed, only
consistent way is to add the override to each api controller.
the action_roles config attribute can therefore be
removed.
using Plack::Middleware::MethodOverride as an alternative from
upstream has the drawback to work only with POST. but a required
usecase is to also support translation DELETE requests to PATCH.
Change-Id: I204ba59869a8327bdd5db8a867fbbb061d1c9e7c
* map regex fixed
* get_form may return an array with the exceptions now
* use get_item_id consistently
* use warnings and strict
Change-Id: I9f356814ecf4b51613d3aee3782a6b3b91f04cad