Flake8ify #1730

* Fixed indentation and unused code for all the files in module to
  improve readability of code.

Issue ID: 179001
Update permission_required decorator to handle new has_permissions #2048

Update permission_required decorator to handle all and any permission
for a nereid user.

Review ID: 279002
Merge pull request #80 from simmianand/feature/task-1730

 Flake8ify #1730
Merge pull request #82 from tarunbhardwaj/feature/task-2048

Update permission_required decorator to handle new has_permissions #2048