httpErrorsBox permissionDeniedDialog openDialog refactoring