Debugged a bit User.hasPermission method