Added permission decorator
Fixed doc
Passing parameters to permission function