Allow and abstract private extra data in the API

Review Request #7674 — Created Oct. 2, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x

Reviewers

The webapi allows for arbitrary data to be set in extra_data for certain API resources. Currently, all of that information is accessible through the API which is not always desirable.
The change in progress will allow users to specify private extra_data which will be abstracted from the publicly api available information.

Change prohibits any kind of modification to private variables (denoted by a leading double-undersore __) in resources containing extra_data, as well as removing the private fields when a resource is requested.

Added APIExtraDataHook to allow extension writers to give access states to extra_data fields.

Added new PUT, POST and GET tests for __ denoted private extra_data.
Ran all tests.

Added new tests for testing the APIExtraDataHook.