Changed the way hasPermission works to treat permissions like an object instead of an array