Simplified some functions
Merge pull request #1312 from amatellanes/master

Simplified some functions in permissions.py