Merge pull request #1312 from amatellanes/master

Simplified some functions in permissions.py
Merge remote-tracking branch 'upstream/master'
Simplified some examples in tutorial