Refactoring innerObjectHasPermission method