Added test for HasPermissionToObject