#JC-1841:Edit Branch Permissions:
* Javascript refactored
* Added documentation for javascript