Api V2 post sample refactoring

Refactoring of the post sample rest api to set the correct
source in the publisher context.
The content of the pipeline is now checked
The admin role special case is now tested

Fixes bug #1202689
Fixes bug #1204593

Change-Id: Id605ae676eddfb4a471e8a3d9f5581e0bf2b8ff0
Merge "Api V2 post sample refactoring"