Added the hasPermission() function

EV-548